Skip to content

Commit a9cc98a

Browse files
committed
fix: gh action fails because curl fails with gpg error
1 parent 2313bd3 commit a9cc98a

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.github/workflows/docker-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
type=semver,pattern={{version}}
5656
type=semver,pattern={{major}}.{{minor}}
5757
58-
# Build and push Docker image with Buildx (don't push on PR)
58+
# Build and push Docker image with Buildx
5959
# https://github.com/docker/build-push-action
6060
- name: Build and push Docker image
6161
uses: docker/build-push-action@v6

Dockerfile

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
FROM srsp/ansible:2.16.8 as build
22

3-
# Install azure cli
4-
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
5-
6-
# Cleanup
7-
RUN apt-get clean
8-
RUN find /usr/lib/ -name '__pycache__' -print0 | xargs -0 -n1 rm -rf \
9-
&& 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 wget gnupg lsb-release && \
5+
mkdir -p /etc/apt/keyrings && \
6+
wget -qO- 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\nURIs: https://packages.microsoft.com/repos/azure-cli/\nSuites: ${AZ_DIST}\nComponents: main\nArchitectures: $(dpkg --print-architecture)\nSigned-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
1015

1116
FROM srsp/ansible:2.16.8
1217

@@ -15,4 +20,4 @@ COPY --from=build /opt/az/ /opt/az/
1520

1621
ENV SSL_CERT_DIR=/etc/ssl/certs
1722

18-
CMD ["/bin/sh"]
23+
CMD ["/bin/sh"]

0 commit comments

Comments
 (0)