Skip to content

Commit

Permalink
Use separate azcli builder
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-at-luther committed Feb 14, 2024
1 parent 4a41dcb commit b7fcc89
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions images/Dockerfile.build-godynamic
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ RUN set -ex; \
./aws/install --bin-dir /aws-cli-bin; \
/aws-cli-bin/aws --version

#
# Azure CLI builder
#

FROM python:3.8-alpine${ALPINE_VERSION} as azcli

ARG AZCLI_VER
ENV AZCLI_VER=$AZCLI_VER

RUN set -ex; \
apk add --no-cache \
build-base libffi-dev openssl-dev cargo python3-dev

RUN set -eux; \
mkdir /az; \
python -m venv /az/venv; \
. /az/venv/bin/activate; \
pip install --no-cache-dir azure-cli==${AZCLI_VER}

#
# Go utils
#
Expand Down Expand Up @@ -85,9 +104,9 @@ COPY --from=go-alpine-downloader /go/bin/golangci-lint /go/bin/golangci-lint
ARG AZCLI_VER
ENV AZCLI_VER=$AZCLI_VER

RUN apk add --no-cache -q --virtual=build gcc musl-dev python3-dev py3-pip libffi-dev openssl-dev cargo make \
&& pip install --no-cache-dir azure-cli==${AZCLI_VER} -q \
&& apk del --purge build

COPY --from=aws /usr/local/aws-cli/ /usr/local/aws-cli/
COPY --from=aws /aws-cli-bin/ /usr/local/bin/

COPY --from=azcli /az/venv /az/venv

ENV PATH="/az/venv/bin:$PATH"

0 comments on commit b7fcc89

Please sign in to comment.