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

Add credential helper and documentation for pushing to Amazon ECR #167

Merged
merged 3 commits into from
May 10, 2018

Conversation

priyawadhwa
Copy link
Collaborator

Begins to fix #109, since there are probably more credential helpers we will want to add

Built off of #165

@@ -18,11 +18,19 @@ FROM golang:1.10
WORKDIR /go/src/github.com/GoogleContainerTools/kaniko
COPY . .
RUN make
WORKDIR /usr/local/bin
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of changing workdir repeatedly can we ADD these into the right place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done!

ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v1.4.3-static/docker-credential-gcr_linux_amd64-1.4.3.tar.gz .
RUN tar -xvzf /usr/local/bin/docker-credential-gcr_linux_amd64-1.4.3.tar.gz
# Get GCR credential helper
ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v1.4.3-static/docker-credential-gcr_linux_amd64-1.4.3.tar.gz /usr/local/bin/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, shouldn't adding the tar also handle the unpacking below? It would be nice to unpack in the same step we add, to avoid having the .tar.gz in the final image.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ADD only unpacks local tar archives, so we need to unpack in the next step. The .tar.gz shouldn't end up in the final image though, because I only copy over the unpacked binary in the next stage

Copy link
Collaborator

Choose a reason for hiding this comment

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

lol... thanks for explaining

@priyawadhwa priyawadhwa merged commit fc75cf5 into GoogleContainerTools:master May 10, 2018
@priyawadhwa priyawadhwa deleted the aws branch May 10, 2018 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to provide login credentials for a registry?
2 participants