Skip to content

Commit

Permalink
use multi-stage build for azure
Browse files Browse the repository at this point in the history
  • Loading branch information
mbialon committed Nov 19, 2024
1 parent a0aac27 commit 0eec4ea
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,26 @@ RUN gcloud --version && \

USER spacelift

FROM base AS azure
FROM base AS azure-build

RUN apk add --no-cache py3-pip gcc musl-dev python3-dev libffi-dev openssl-dev cargo make
RUN pip install --break-system-packages azure-cli

RUN az --version && \
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

RUN pip install --no-cache-dir azure-cli

FROM base AS azure

ENV VIRTUAL_ENV=/opt/venv
ENV PATH="/opt/venv/bin:$PATH"

COPY --from=azure-build /opt/venv /opt/venv

RUN apk add --no-cache py3-pip && \
az --version && \
terragrunt --version && \
python --version && \
infracost --version

USER spacelift

0 comments on commit 0eec4ea

Please sign in to comment.