Sitelet https://github.com/cytopia/docker-ansible/commit/c4d7698db4dd792b8dc1e9fca3eb887e1fb2f934
Skip to content

Commit c4d7698

Browse files
authored
Fix Docker images (#146)
* Trigger Build * Trigger build * Fix Dockerfile * Fix stage: tools * Fix stage: infra * Fix stage: awsk8s * Fix arm64 aws image * Fix libs
1 parent c241687 commit c4d7698

10 files changed

Lines changed: 44 additions & 22 deletions

File tree

‎.github/workflows/params.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ env:
5252
}
5353
]
5454
55-
# Set Refs to build for scheduled jobs
55+
# Set Refs to build for scheduled jobs.
5656
REFS: >-
5757
{
5858
"DEFAULT_BRANCH": "master",

‎Dockerfiles/Dockerfile-aws‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG VERSION
33
# --------------------------------------------------------------------------------------------------
44
# Builder Image
55
# --------------------------------------------------------------------------------------------------
6-
FROM cytopia/ansible:${VERSION}-tools as builder
6+
FROM cytopia/ansible:${VERSION}-tools AS builder
77

88
# Required tools for building Python packages
99
RUN set -eux \
@@ -18,6 +18,7 @@ RUN set -eux \
1818
python3-dev \
1919
# misc tools
2020
git \
21+
curl \
2122
# go tools
2223
cargo \
2324
go
@@ -33,6 +34,23 @@ RUN set -eux \
3334
&& find /usr/lib/ -name '__pycache__' -print0 | xargs -0 -n1 rm -rf \
3435
&& find /usr/lib/ -name '*.pyc' -print0 | xargs -0 -n1 rm -rf
3536

37+
# Fix go Version
38+
RUN set -eux \
39+
&& mkdir -p /tmp/go \
40+
&& cd /tmp/go \
41+
&& if [ "$(uname -m)" = "aarch64" ]; then \
42+
ARCH="arm64"; \
43+
elif [ "$(uname -m)" = "x86_64" ]; then \
44+
ARCH="amd64"; \
45+
else \
46+
fail; \
47+
fi \
48+
&& curl -OL https://golang.org/dl/go1.25.0.linux-${ARCH}.tar.gz \
49+
&& tar -C /usr/local -xzf go1.25.0.linux-${ARCH}.tar.gz \
50+
&& ln -s /usr/local/go/bin/go /usr/local/bin/go \
51+
&& rm -rf /usr/bin/go
52+
53+
3654
# aws-iam-authemticator (copied to final image)
3755
RUN set -eux \
3856
&& if [ "$(uname -m)" = "aarch64" ]; then \
@@ -62,7 +80,7 @@ RUN set -eux \
6280
# --------------------------------------------------------------------------------------------------
6381
# Final Image
6482
# --------------------------------------------------------------------------------------------------
65-
FROM cytopia/ansible:${VERSION}-tools as production
83+
FROM cytopia/ansible:${VERSION}-tools AS production
6684
ARG VERSION
6785
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
6886
#LABEL "org.opencontainers.image.created"=""

‎Dockerfiles/Dockerfile-awshelm‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG VERSION
33
# --------------------------------------------------------------------------------------------------
44
# Builder Image
55
# --------------------------------------------------------------------------------------------------
6-
FROM cytopia/ansible:${VERSION}-awsk8s as builder
6+
FROM cytopia/ansible:${VERSION}-awsk8s AS builder
77

88
# Required tools for building Python packages
99
RUN set -eux \
@@ -39,7 +39,7 @@ RUN set -eux \
3939
# --------------------------------------------------------------------------------------------------
4040
# Final Image
4141
# --------------------------------------------------------------------------------------------------
42-
FROM cytopia/ansible:${VERSION}-awsk8s as production
42+
FROM cytopia/ansible:${VERSION}-awsk8s AS production
4343
ARG VERSION
4444
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
4545
#LABEL "org.opencontainers.image.created"=""

‎Dockerfiles/Dockerfile-awsk8s‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG VERSION
33
# --------------------------------------------------------------------------------------------------
44
# Builder Image
55
# --------------------------------------------------------------------------------------------------
6-
FROM cytopia/ansible:${VERSION}-aws as builder
6+
FROM cytopia/ansible:${VERSION}-aws AS builder
77

88
# Required tools for building Python packages
99
RUN set -eux \
@@ -36,11 +36,11 @@ RUN set -eux \
3636
fail; \
3737
fi \
3838
\
39-
&& KUBECTL_VERSION="$(curl -sS --fail https://storage.googleapis.com/kubernetes-release/release/stable.txt)" \
39+
&& KUBECTL_VERSION="$(curl -L -sS --fail https://dl.k8s.io/release/stable.txt)" \
4040
&& curl -sS -L --fail -o /usr/bin/kubectl \
41-
https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl \
41+
"https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" \
4242
&& chmod +x /usr/bin/kubectl \
43-
&& kubectl version --client --short=true 2>&1 | grep -E 'v[.0-9]+'
43+
&& kubectl version --client 2>&1 | grep -E 'v[.0-9]+'
4444

4545
# openshift client (copied to final image)
4646
RUN set -eux \
@@ -50,6 +50,9 @@ RUN set -eux \
5050
&& exit 0; \
5151
fi \
5252
\
53+
# Fix openshift
54+
&& ln -s /lib/libc.musl-x86_64.so.1 /usr/lib/libresolv.so.2 \
55+
\
5356
&& curl -sS -L --fail -o /tmp/openshift-client-linux.tar.gz \
5457
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz \
5558
&& mkdir /tmp/openshift-client-linux/ \
@@ -63,7 +66,7 @@ RUN set -eux \
6366
# --------------------------------------------------------------------------------------------------
6467
# Final Image
6568
# --------------------------------------------------------------------------------------------------
66-
FROM cytopia/ansible:${VERSION}-aws as production
69+
FROM cytopia/ansible:${VERSION}-aws AS production
6770
ARG VERSION
6871
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
6972
#LABEL "org.opencontainers.image.created"=""

‎Dockerfiles/Dockerfile-awskops‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG VERSION
33
# --------------------------------------------------------------------------------------------------
44
# Builder Image
55
# --------------------------------------------------------------------------------------------------
6-
FROM cytopia/ansible:${VERSION}-awsk8s as builder
6+
FROM cytopia/ansible:${VERSION}-awsk8s AS builder
77

88
# Required tools for building Python packages
99
RUN set -eux \
@@ -47,7 +47,7 @@ RUN set -eux \
4747
# --------------------------------------------------------------------------------------------------
4848
# Final Image
4949
# --------------------------------------------------------------------------------------------------
50-
FROM cytopia/ansible:${VERSION}-awsk8s as production
50+
FROM cytopia/ansible:${VERSION}-awsk8s AS production
5151
ARG VERSION
5252
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
5353
#LABEL "org.opencontainers.image.created"=""

‎Dockerfiles/Dockerfile-azure‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG VERSION
33
# --------------------------------------------------------------------------------------------------
44
# Builder Image
55
# --------------------------------------------------------------------------------------------------
6-
FROM cytopia/ansible:${VERSION}-tools as builder
6+
FROM cytopia/ansible:${VERSION}-tools AS builder
77

88
# Required tools for building Python packages
99
RUN set -eux \
@@ -54,7 +54,7 @@ RUN set -eux \
5454
# --------------------------------------------------------------------------------------------------
5555
# Final Image
5656
# --------------------------------------------------------------------------------------------------
57-
FROM cytopia/ansible:${VERSION}-tools as production
57+
FROM cytopia/ansible:${VERSION}-tools AS production
5858
ARG VERSION
5959
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
6060
#LABEL "org.opencontainers.image.created"=""

‎Dockerfiles/Dockerfile-base‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# --------------------------------------------------------------------------------------------------
22
# Builder Image
33
# --------------------------------------------------------------------------------------------------
4-
FROM alpine:3.17 as builder
4+
FROM alpine:3.17 AS builder
55

66
RUN set -eux \
77
&& apk add --update --no-cache \
@@ -28,7 +28,7 @@ RUN set -eux \
2828

2929
# Pip required tools
3030
RUN set -eux \
31-
&& pip3 install --no-cache-dir --no-compile \
31+
&& pip3 install --no-cache-dir --no-compile --ignore-installed \
3232
wheel
3333
RUN set -eux \
3434
&& pip3 install --no-cache-dir --no-compile \
@@ -99,7 +99,7 @@ RUN set -eux \
9999
# --------------------------------------------------------------------------------------------------
100100
# Final Image
101101
# --------------------------------------------------------------------------------------------------
102-
FROM alpine:3.17 as production
102+
FROM alpine:3.17 AS production
103103
ARG VERSION
104104
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
105105
#LABEL "org.opencontainers.image.created"=""

‎Dockerfiles/Dockerfile-infra‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG VERSION
33
# --------------------------------------------------------------------------------------------------
44
# Builder Image
55
# --------------------------------------------------------------------------------------------------
6-
FROM cytopia/ansible:${VERSION}-tools as builder
6+
FROM cytopia/ansible:${VERSION}-tools AS builder
77

88
# Required tools for building Python packages
99
RUN set -eux \
@@ -24,6 +24,7 @@ RUN set -eux \
2424

2525
# Python packages (copied to final image)
2626
RUN set -eux \
27+
&& pip3 install --no-cache-dir --no-compile "PyYAML==5.3.1" \
2728
&& pip3 install --no-cache-dir --no-compile \
2829
PyMySQL \
2930
docker \
@@ -46,7 +47,7 @@ RUN set -eux \
4647
# --------------------------------------------------------------------------------------------------
4748
# Final Image
4849
# --------------------------------------------------------------------------------------------------
49-
FROM cytopia/ansible:${VERSION}-tools as production
50+
FROM cytopia/ansible:${VERSION}-tools AS production
5051
ARG VERSION
5152
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
5253
#LABEL "org.opencontainers.image.created"=""

‎Dockerfiles/Dockerfile-tools‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG VERSION
33
# --------------------------------------------------------------------------------------------------
44
# Builder Image
55
# --------------------------------------------------------------------------------------------------
6-
FROM cytopia/ansible:${VERSION} as builder
6+
FROM cytopia/ansible:${VERSION} AS builder
77
ARG VERSION
88

99
RUN set -eux \
@@ -53,7 +53,7 @@ RUN set -eux \
5353
# --------------------------------------------------------------------------------------------------
5454
# Final Image
5555
# --------------------------------------------------------------------------------------------------
56-
FROM cytopia/ansible:${VERSION} as production
56+
FROM cytopia/ansible:${VERSION} AS production
5757
ARG VERSION
5858
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
5959
#LABEL "org.opencontainers.image.created"=""

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,4 +961,4 @@ The provided Makefiles will only require GNU Make and Docker itself removing the
961961

962962
**[MIT License](LICENSE)**
963963

964-
Copyright (c) 2019 [cytopia](https://github.com/cytopia)
964+
Copyright (c) 2026 [cytopia](https://github.com/cytopia)

0 commit comments

Comments
 (0)