Commit bbb20d0 1 parent 0669187 commit bbb20d0 Copy full SHA for bbb20d0
File tree 1 file changed +13
-11
lines changed
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 1
1
FROM srsp/ansible:2.16.8 as build
2
2
3
- RUN apt-get update && apt-get upgrade -y
4
- RUN apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg
5
-
6
- # Install azure cli
7
- RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
8
-
9
- # Cleanup
10
- RUN apt-get clean
11
- RUN find /usr/lib/ -name '__pycache__' -print0 | xargs -0 -n1 rm -rf \
12
- && find /usr/lib/ -name '*.pyc' -print0 | xargs -0 -n1 rm -rf
3
+ RUN apt-get update && \
4
+ apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release && \
5
+ mkdir -p /etc/apt/keyrings && \
6
+ curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg && \
7
+ chmod go+r /etc/apt/keyrings/microsoft.gpg && \
8
+ AZ_DIST=$(lsb_release -cs) && \
9
+ echo "Types: deb\n URIs: https://packages.microsoft.com/repos/azure-cli/\n Suites: ${AZ_DIST}\n Components: main\n Architectures: $(dpkg --print-architecture)\n Signed-by: /etc/apt/keyrings/microsoft.gpg" | tee /etc/apt/sources.list.d/azure-cli.sources && \
10
+ apt-get update && \
11
+ apt-get install -y azure-cli && \
12
+ apt-get clean && \
13
+ find /usr/lib/ -name '__pycache__' -print0 | xargs -0 -n1 rm -rf && \
14
+ find /usr/lib/ -name '*.pyc' -print0 | xargs -0 -n1 rm -rf
13
15
14
16
FROM srsp/ansible:2.16.8
15
17
@@ -18,4 +20,4 @@ COPY --from=build /opt/az/ /opt/az/
18
20
19
21
ENV SSL_CERT_DIR=/etc/ssl/certs
20
22
21
- CMD ["/bin/sh" ]
23
+ CMD ["/bin/sh" ]
You can’t perform that action at this time.
0 commit comments