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

The documentation for the mount options under RUN instruction in the Dockerfile reference is inconsistent with actual implementation. #20019

Open
1 task done
TyIsI opened this issue May 10, 2024 · 2 comments

Comments

@TyIsI
Copy link

TyIsI commented May 10, 2024

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

The documentation for the RUN instruction in the Dockerfile reference is inconsistent with actual implementation.
Or probably the other way around.

Options not specified in the documentation are unexpectedly supported and the source code for commands_runmount.go shows that restrictions listed in the documentation are not applied as such.

Examples:

## Works with all options
RUN --mount=type=tmpfs,target=/cache,size=1024,ro,readonly,rw,readwrite /bin/ls -asl /cache
## ERROR [internal] load metadata for docker.io/library/nonexistent:latest, but should not work
RUN --mount=type=tmpfs,target=/cache,size=1024,from=nonexistent /bin/ls -asl /cache
## Shows directories in root, documentation says from=<stage>, but happily loads image
RUN --mount=type=cache,target=/cache,from=alpine:3,source=/ /bin/ls -asl /cache

Location

https://docs.docker.com/reference/dockerfile/

Suggestion

I didn't test more extensively and I have no idea what's intentional, but I'll go open a ticket in the buildkit repo for this.

Happy weekend!

@docker-robot
Copy link

docker-robot bot commented Aug 8, 2024

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

@TyIsI
Copy link
Author

TyIsI commented Aug 8, 2024

/remove-lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants