Skip to content

Commit

Permalink
feat: Remove not necessary az extension (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
pasqualedevita committed Oct 19, 2022
1 parent d8c9156 commit 811e75b
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ RUN curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor |
AZ_REPO=$(lsb_release -cs) && \
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list

RUN apt-get -y update && apt-get -y install azure-cli
RUN az extension add --name containerapp --system && \
az extension add --name aks-preview --system && \
az extension add --name account --system
RUN apt-get update && apt-get -y install azure-cli

RUN az config set extension.use_dynamic_install=yes_without_prompt

# install python-pip

Expand All @@ -41,25 +40,30 @@ RUN apt-get -y install python-pip
RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list

RUN apt-get -y update && apt-get -y install kubectl
RUN apt-get update && apt-get -y install kubectl

# install helm from https://helm.sh/docs/intro/install/#from-apt-debianubuntu

RUN curl https://baltocdn.com/helm/signing.asc | apt-key add - && \
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list

RUN apt-get -y update && apt-get -y install helm
RUN apt-get update && apt-get -y install helm

# install jq from https://stedolan.github.io/jq/download/

RUN apt-get update && apt-get -y install jq

# install yq from https://github.com/mikefarah/yq#install

RUN YQ_VERSION="v4.28.2" && \
YQ_BINARY="yq_linux_amd64" && \
wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}.tar.gz -O - | tar xz && mv ${YQ_BINARY} /usr/bin/yq && \
yq --version
wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}.tar.gz -O - | tar xz && mv ${YQ_BINARY} /usr/bin/yq

####

RUN useradd github && \
mkdir -p /home/github && \
chown -R github:github /home/github && \
chown -R github:github /actions-runner

COPY entrypoint.sh /entrypoint.sh
Expand All @@ -69,4 +73,10 @@ USER github

WORKDIR /

RUN whoami && \
az --version && \
kubectl --help && \
helm --help && \
yq --version

ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit 811e75b

Please sign in to comment.