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

run: Dockerfile COPY to ./ #3665

Merged
merged 1 commit into from
May 1, 2020
Merged

run: Dockerfile COPY to ./ #3665

merged 1 commit into from
May 1, 2020

Conversation

grayside
Copy link
Collaborator

@grayside grayside commented May 1, 2020

One of the Dockerfile sample practices we attempt on Cloud Run is to use ./ as the default destination of Dockerfile COPY statements.

It doesn't really change the behaviors we expect:

COPY . . = COPY . ./
COPY README.md . = COPY README.md ./ = COPY README.md README.md

However, it matters when developers try to use the multi-source arguments option with COPY:

COPY README.md main.py . = ERROR!!
COPY README.md main.py ./ = Happy Dance 👯

By using ./ wherever just a . appears, it adds a little more noise to the Dockerfile but in exchange there's one less source of friction if developers iterate on top of the Dockerfiles we provide.

I'm working on standardizing this further, but for now sending a little PR to nudge Cloud Run Python alignment.

@grayside grayside requested a review from dinagraves May 1, 2020 17:24
@grayside grayside requested review from averikitsch and a team as code owners May 1, 2020 17:24
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 1, 2020
Copy link
Contributor

@dinagraves dinagraves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The e2e test passed :)

@tmatsuo tmatsuo merged commit 1263a63 into master May 1, 2020
@tmatsuo tmatsuo deleted the dockerfile-copy-standard branch May 1, 2020 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants