docker / docker/cli

docker-build man page doesn't reflect new rules for Dockerfile path

Open
#1,549 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/builder
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Description

Now that #886 allows the Dockerfile to be outside the build context, the man page is no longer correct.

Describe the results you received:

The docker-build man page says for --file:

If the path is a relative path and you are building from a local directory, then the path must be relative to that directory. If you are building from a remote URL pointing to either a tarball or a Git repository, then the path must be relative to the root of the remote context. In all cases, the file must be within the build context. The default is Dockerfile.

Describe the results you expected:

This should reflect the actual behavior. If I understand correctly, the path is actually relative to the directory in which docker build was run, not the build context dir specified in PATH. I don't know the rules for remote URLs.

Output of docker version:

Docker version 18.09.0, build 4d60db4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the docker-build man page and its --file documentation, then review the behavior introduced by issue #886 for local and remote build contexts. Update the wording to match the actual Docker CLI rules, including the unresolved remote-URL cases, and verify the resulting documentation against docker build behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.