-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define version of Image Builder image with Azure CLI installed (#1068)
- Loading branch information
Showing
3 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
ARG PYTHON_VERSION=3.10 | ||
ARG ARCH=amd64 | ||
|
||
# Azure CLI installer | ||
FROM mcr.microsoft.com/dotnet-buildtools/image-builder:linux-$ARCH AS az-installer | ||
|
||
ARG PYTHON_VERSION | ||
|
||
# install Azure CLI | ||
RUN apk add --no-cache \ | ||
cargo \ | ||
gcc \ | ||
libffi-dev \ | ||
make \ | ||
musl-dev \ | ||
openssl-dev \ | ||
py3-pip \ | ||
python3-dev~=$PYTHON_VERSION | ||
|
||
RUN pip install azure-cli | ||
|
||
|
||
# build final image | ||
FROM mcr.microsoft.com/dotnet-buildtools/image-builder:linux-$ARCH | ||
|
||
ARG PYTHON_VERSION | ||
RUN apk add python3~=$PYTHON_VERSION | ||
|
||
COPY --from=az-installer /usr/bin/az /usr/bin/az | ||
COPY --from=az-installer /usr/lib/python$PYTHON_VERSION/site-packages /usr/lib/python$PYTHON_VERSION/site-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters