Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False statement about docker build's -f flag #8268

Open
cristi8 opened this issue Feb 15, 2019 · 9 comments · May be fixed by docker/cli#3424
Open

False statement about docker build's -f flag #8268

cristi8 opened this issue Feb 15, 2019 · 9 comments · May be fixed by docker/cli#3424
Assignees
Labels
area/build Relates to Dockerfiles or docker build command area/engine Issue affects Docker engine/daemon lifecycle/frozen

Comments

@cristi8
Copy link
Contributor

cristi8 commented Feb 15, 2019

File: engine/reference/commandline/build.md

The documentation about docker build's "-f" flag mentions the following:
If a relative path is specified then it is interpreted as relative to the root of the context.
This is false and misleading. It looks like if a relative path is specified, it is searched as being relative to the current directory, not the root of the context.

An example of the correct usage is also on the same page, when it mentions that the two docker build commands do the same thing:

$ cd /home/me/myapp/some/dir/really/deep
$ docker build -f /home/me/myapp/dockerfiles/debug /home/me/myapp
$ docker build -f ../../../../dockerfiles/debug /home/me/myapp

It is visible there that the second docker build uses a relative path that is relative to the current directory, not the root of the context.

@paigehargrave paigehargrave added the area/engine Issue affects Docker engine/daemon label Mar 1, 2019
@cristi8 cristi8 linked a pull request Feb 12, 2022 that will close this issue
@cristi8
Copy link
Contributor Author

cristi8 commented Mar 9, 2022

This was opened more than 3 years ago. It's a simple false statement in the docs.

I even made a PR a month ago.

Why isn't this being fixed / PR merged?

@docker-robott
Copy link
Collaborator

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@cristi8
Copy link
Contributor Author

cristi8 commented Dec 6, 2022

/remove-lifecycle stale

The documentation still needs fixing

@docker-robott
Copy link
Collaborator

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@cristi8
Copy link
Contributor Author

cristi8 commented Mar 6, 2023

/remove-lifecycle stale

@nigelpoulton any news about this?

The documentation of docker build still needs fixing

@nigelpoulton
Copy link
Contributor

@cristi8 I think this was incorrectly assigned to me. I'm not working on Docker docs.

@docker-robott
Copy link
Collaborator

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@thaJeztah thaJeztah added area/build Relates to Dockerfiles or docker build command lifecycle/frozen and removed lifecycle/stale labels Jun 4, 2023
@cristi8
Copy link
Contributor Author

cristi8 commented Jun 9, 2023

/remove-lifecycle stale

The official docker documentation is still wrong about the -f flag.

https://docs.docker.com/engine/reference/commandline/build/

@nigelpoulton i see you are still assigned to this. I don't know how the issue assignments work, but how can this issue be assigned to the right person? Having the official docker build documentation be misleading about such a common flag is not that nice

@cristi8
Copy link
Contributor Author

cristi8 commented Jan 14, 2025

I can see the docs have been rewritten in the meantime and the issue is no longer present.

It's crazy how the official documentation for docker build, used by everyone, was misleading for 5 years and nobody wanted to fix it.

I guess this issue is no longer needed, except to point out the state of open source collaboration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Relates to Dockerfiles or docker build command area/engine Issue affects Docker engine/daemon lifecycle/frozen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants