@@ -27,33 +27,22 @@ LABEL maintainer="Microsoft" \
2727
2828
2929# ca-certificates bash bash-completion - for convenience
30- # libintl and icu-libs - required by azure-devops https://github.com/Azure/azure-cli/pull/9683
30+ # libintl icu-libs - required by azure-devops https://github.com/Azure/azure-cli/pull/9683
3131# libc6-compat - required by az storage blob sync https://github.com/Azure/azure-cli/issues/10381
32-
33- # We don't use openssl (3.0) for now. We only install it so that users can use it.
34- RUN apk add --no-cache ca-certificates bash bash-completion libintl icu-libs libc6-compat && update-ca-certificates
32+ # gcc python3-dev musl-dev linux-headers libffi-dev - temporarily required by psutil
3533
3634WORKDIR azure-cli
3735COPY . /azure-cli
36+ RUN apk add --no-cache ca-certificates bash bash-completion libintl icu-libs libc6-compat \
37+ && apk add --no-cache --virtual .build-deps gcc python3-dev musl-dev linux-headers libffi-dev \
38+ && update-ca-certificates && ./scripts/install_full.sh && python ./scripts/trim_sdk.py \
39+ && cat /azure-cli/az.completion > ~/.bashrc \
40+ && dos2unix /root/.bashrc /usr/local/bin/az \
41+ && apk del .build-deps
3842
39- # 1. Build packages and store in tmp dir
40- # 2. Install the cli and the other command modules that weren't included
41- RUN ./scripts/install_full.sh && python ./scripts/trim_sdk.py \
42- && cat /azure-cli/az.completion > ~/.bashrc \
43- && runDeps="$( \
44- scanelf --needed --nobanner --recursive /usr/local \
45- | awk '{ gsub(/,/, " \n so:", $2); print " so:" $2 }' \
46- | sort -u \
47- | xargs -r apk info --installed \
48- | sort -u \
49- )" \
50- && apk add --virtual .rundeps $runDeps
43+ RUN rm -rf /azure-cli
5144
5245WORKDIR /
5346
54- # Remove CLI source code from the final image and normalize line endings.
55- RUN rm -rf ./azure-cli && \
56- dos2unix /root/.bashrc /usr/local/bin/az
57-
5847ENV AZ_INSTALLER=DOCKER
5948CMD bash
0 commit comments