Skip to content

Commit 0932fac

Browse files
authored
Move to Ubuntu24.04 and python3.12 (#272)
1 parent 9c3e93a commit 0932fac

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

Dockerfile

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
FROM ubuntu:jammy as helm
1+
FROM ubuntu:24.04 AS helm
22

33
RUN apt-get update && \
4-
apt-get install -y curl && \
5-
rm -rf /var/lib/apt/lists/*
4+
apt-get install -y curl wget ca-certificates
65

76
ARG HELM_VERSION=v3.18.3
87
RUN set -ex; \
@@ -12,15 +11,15 @@ RUN set -ex; \
1211
aarch64) helm_arch=arm64 ;; \
1312
*) false ;; \
1413
esac; \
15-
curl -fsSL https://get.helm.sh/helm-${HELM_VERSION}-linux-${helm_arch}.tar.gz | \
14+
wget -q -O - https://get.helm.sh/helm-${HELM_VERSION}-linux-${helm_arch}.tar.gz | \
1615
tar -xz --strip-components 1 -C /usr/bin linux-${helm_arch}/helm; \
1716
helm version
1817

1918

20-
FROM ubuntu:jammy AS python-builder
19+
FROM ubuntu:24.04 AS python-builder
2120

2221
RUN apt-get update && \
23-
apt-get install -y python3 python3-venv && \
22+
apt-get install -y python3 python3-venv git && \
2423
rm -rf /var/lib/apt/lists/*
2524

2625
RUN python3 -m venv /venv && \
@@ -33,13 +32,13 @@ COPY . /app
3332
RUN /venv/bin/pip install /app
3433

3534

36-
FROM ubuntu:jammy
35+
FROM ubuntu:24.04
3736

3837
# Create the user that will be used to run the app
39-
ENV APP_UID 1001
40-
ENV APP_GID 1001
41-
ENV APP_USER app
42-
ENV APP_GROUP app
38+
ENV APP_UID=1001
39+
ENV APP_GID=1001
40+
ENV APP_USER=app
41+
ENV APP_GROUP=app
4342
RUN groupadd --gid $APP_GID $APP_GROUP && \
4443
useradd \
4544
--no-create-home \
@@ -50,24 +49,23 @@ RUN groupadd --gid $APP_GID $APP_GROUP && \
5049
$APP_USER
5150

5251
RUN apt-get update && \
53-
apt-get install -y ca-certificates python3 tini && \
52+
apt-get install -y ca-certificates python3 && \
5453
rm -rf /var/lib/apt/lists/*
5554

5655
# Don't buffer stdout and stderr as it breaks realtime logging
57-
ENV PYTHONUNBUFFERED 1
56+
ENV PYTHONUNBUFFERED=1
5857

5958
# Make httpx use the system trust roots
6059
# By default, this means we use the CAs from the ca-certificates package
61-
ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt
60+
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
6261

6362
# Tell Helm to use /tmp for mutable data
64-
ENV HELM_CACHE_HOME /tmp/helm/cache
65-
ENV HELM_CONFIG_HOME /tmp/helm/config
66-
ENV HELM_DATA_HOME /tmp/helm/data
63+
ENV HELM_CACHE_HOME=/tmp/helm/cache
64+
ENV HELM_CONFIG_HOME=/tmp/helm/config
65+
ENV HELM_DATA_HOME=/tmp/helm/data
6766

6867
COPY --from=helm /usr/bin/helm /usr/bin/helm
6968
COPY --from=python-builder /venv /venv
7069

7170
USER $APP_UID
72-
ENTRYPOINT ["tini", "-g", "--"]
73-
CMD ["/venv/bin/kopf", "run", "--module", "capi_addons.operator", "--all-namespaces"]
71+
CMD ["/venv/bin/kopf", "run", "--module", "capi_addons.operator", "--all-namespaces", "--verbose"]

0 commit comments

Comments
 (0)