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

Install gcloud auth plugin in kanister build image #3210

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docker/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /
RUN apt update && apt install -y docker-ce docker-ce-cli containerd.io \
&& apt-get clean

RUN apt-get install apt-transport-https ca-certificates
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for not adding this in the first apt-get install above (line 7)?

Also, remove the apt-get clean above (line 14) and move it to after the last apt-get install below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @julio-lopez ,
Thank you for the review, I can work on above suggestions.
But I initially thought that we would just need to install gcloud and gcloud auth plugin, in the kanister build image, and things would work but that doesn't seem to be the case.

We will also have to set up gcloud authentication, which I think needs to be discussed with the team and then worked on, so I am planning to park this for now and work on it after discussing this in community call.

# Add the gcloud CLI distribution URI as a package source and install plugin
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& apt-get update \
&& apt-get install -y google-cloud-sdk-gke-gcloud-auth-plugin

COPY --from=bitnami/kubectl:1.26 /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/

COPY --from=goreleaser/goreleaser:v1.26.2 /usr/bin/goreleaser /usr/local/bin/
Expand Down