Skip to content

Commit cd2835e

Browse files
authored
feat: Add gh cli to the image (#65)
1 parent a1c6523 commit cd2835e

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

Dockerfile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ ENV KUBELOGIN_VERSION="${ENV_KUBELOGIN_VERSION:-0.2.10}"
3030
RUN az aks install-cli --kubelogin-version "${KUBELOGIN_VERSION}"
3131

3232
FROM deps-az AS deps-kube
33-
RUN curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null
34-
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list
33+
RUN apt-get install curl gpg apt-transport-https --yes
34+
RUN curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null
35+
RUN echo "deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main" | tee /etc/apt/sources.list.d/helm-stable-debian.list
3536
RUN apt-get update \
36-
&& apt-get satisfy "helm" -y \
37+
&& apt-get install helm -y \
3738
&& apt-get clean \
3839
&& rm -rf /var/lib/apt/lists/*
3940

@@ -53,11 +54,17 @@ RUN apt-get update \
5354
&& apt-get clean \
5455
&& rm -rf /var/lib/apt/lists/*
5556

56-
FROM deps-node-yarn AS deps-docker-compose
57+
FROM deps-node-yarn AS deps-docker-compose
5758
RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
58-
&& chmod +x /usr/local/bin/docker-compose
59+
&& chmod +x /usr/local/bin/docker-compose
5960

60-
FROM deps-docker-compose AS final
61+
FROM deps-docker-compose AS deps-gh-cli
62+
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg;
63+
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null;
64+
RUN apt update \
65+
&& apt install -y gh
66+
67+
FROM deps-gh-cli AS final
6168
COPY ./github-runner-entrypoint.sh ./entrypoint.sh
6269
RUN chmod +x ./entrypoint.sh
6370

@@ -73,6 +80,7 @@ RUN whoami \
7380
&& echo "node: $(node --version)" \
7481
&& echo "npm: $(npm --version)" \
7582
&& echo "yarn: $(yarn --version)" \
76-
&& echo "docker-compose: $(docker-compose --version)"
83+
&& echo "docker-compose: $(docker-compose --version)" \
84+
&& echo "gh: $(gh --version)"
7785

7886
ENTRYPOINT ["./entrypoint.sh"]

0 commit comments

Comments
 (0)