forked from kestra-io/kestra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
39 lines (33 loc) · 1.56 KB
/
Copy pathDockerfile.base
File metadata and controls
39 lines (33 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ARG JRE_VERSION="25"
# Pin the Ubuntu release explicitly. The unsuffixed `-jre` tag floats to the
# latest Ubuntu, which silently drifted to 26.04 (Python 3.14) and broke the
# build: `amazon-ion` (a `kestra` pip dep) has no cp314 wheel, so pip falls back
# to a source build that needs cmake/gcc. 24.04 LTS ships Python 3.12, for which
# a wheel exists. Pinning also keeps the base OS (and its UID layout) stable.
FROM eclipse-temurin:${JRE_VERSION}-jre-noble
ARG UV_VERSION="0.6.17"
ARG WITH_PYTHON="false"
# Ubuntu 24.04+ bases (eclipse-temurin:*-jre) ship a default `ubuntu` user on
# UID/GID 1000, which would push our `useradd` to 1001. Pin kestra to 1000 so
# deployments that assume it (Helm rootless DinD socket group, fsGroup, existing
# PVC ownership) keep working.
RUN userdel -r ubuntu 2>/dev/null || true; \
groupadd -g 1000 kestra && \
useradd -u 1000 -g 1000 -m kestra
WORKDIR /app
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends curl jattach && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
RUN curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh && \
mv /root/.local/bin/uv /bin && \
mv /root/.local/bin/uvx /bin
RUN if [ "$WITH_PYTHON" = "true" ]; then \
apt-get update -y && \
apt-get install -y --no-install-recommends python3 python-is-python3 python3-pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
uv venv /app/.venv && \
PURE_PYTHON=1 uv pip install --python /app/.venv/bin/python kestra; \
fi