Skip to content

Commit 6bb12c0

Browse files
committed
Size adjustment for docker image with Azure CLI
Signed-off-by: Brian Towles <btowles@cloudera.com>
1 parent bacc658 commit 6bb12c0

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

Dockerfile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1-
FROM python:3.8.11-slim
1+
FROM python:3.9.7-slim
22
ARG BUILD_DATE
33
ARG BUILD_TAG
44
ARG BASE_IMAGE_TAG
55
ARG APPLICATION_VERSION
66

77
ENV CLDR_BUILD_DATE=${BUILD_DATE}
88
ENV CLDR_BUILD_VER=${BUILD_TAG}
9-
ENV CDPCTL_APPLICATION_VERSION=${APPLICATION_VERSION}
109

10+
ENV CDPCTL_APPLICATION_VERSION=${APPLICATION_VERSION}
1111
COPY . /tmp/src
1212

1313
RUN cd /tmp/src \
14+
&& pip3 --no-cache-dir install azure-cli==2.28.0 \
1415
&& echo "\"\"\"Version info.\"\"\"" > cdpctl/__version__.py \
1516
&& echo "__version__ = \"${CDPCTL_APPLICATION_VERSION}\"" >> cdpctl/__version__.py \
16-
&& apt update \
17-
&& apt install -y --no-install-recommends ca-certificates curl apt-transport-https lsb-release gnupg \
18-
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null \
19-
&& export AZ_REPO=$(lsb_release -cs) \
20-
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list \
21-
&& apt update \
22-
&& apt-get install azure-cli \
23-
&& apt clean \
2417
&& rm -rf /var/lib/apt/lists/* \
2518
&& python3 setup.py install \
2619
&& cd / \

0 commit comments

Comments
 (0)