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

WORKDIR behavior description contradicts COPY --from description #20152

Open
1 task done
jedahan opened this issue Jun 5, 2024 · 6 comments
Open
1 task done

WORKDIR behavior description contradicts COPY --from description #20152

jedahan opened this issue Jun 5, 2024 · 6 comments
Labels
status/triage Needs triage

Comments

@jedahan
Copy link

jedahan commented Jun 5, 2024

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

These two excerpts from the documentation contradict each other. Which one is true?

From https://docs.docker.com/reference/dockerfile/#workdir

The WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile.

From https://docs.docker.com/reference/dockerfile/#copy---from

The source path of COPY --from is always resolved from filesystem root of the image or stage that you specify.

Location

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

Suggestion

Assuming that COPY --from ignores the WORKDIR definition, I'd propose the following two items:

Add a note with all the exceptions to WORKDIR in the WORKDIR section.

Add a note that COPY --from will ignore WORKDIR in the COPY --from section.

@jedahan jedahan added the status/triage Needs triage label Jun 5, 2024
@docker-robot
Copy link

docker-robot bot commented Sep 3, 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

@jedahan
Copy link
Author

jedahan commented Sep 3, 2024

/remove-lifecycle stale

@docker-robot
Copy link

docker-robot bot commented Dec 2, 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

@jedahan
Copy link
Author

jedahan commented Dec 2, 2024

/remove-lifecycle stale

@docker-robot
Copy link

docker-robot bot commented Mar 2, 2025

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

@jedahan
Copy link
Author

jedahan commented Mar 2, 2025

/remove-lifecycle stale

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

No branches or pull requests

1 participant