-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (43 loc) · 1.4 KB
/
Copy pathDockerfile
File metadata and controls
50 lines (43 loc) · 1.4 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
40
41
42
43
44
45
46
47
48
49
50
FROM quay.io/sclorg/python-314-minimal-c9s:20260610@sha256:5742b2c3a19d4d8b434e5bfb300f7188d19eaf4a7dfd8077ea29b19105e46ddb AS base
FROM ghcr.io/radiorabe/s2i-base:2.7.0@sha256:e381a61a29987bebc958d9e76f473447677b5cdb9b799eaad11b076592318560
EXPOSE 8080
ENV \
PYTHON_VERSION=3.12 \
PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=UTF-8 \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
CNB_STACK_ID=ch.rabe.it.stacks.ubi9-python-312 \
CNB_USER_ID=1001 \
CNB_GROUP_ID=0 \
PIP_NO_CACHE_DIR=off \
PATH=$APP_ROOT/bin:$HOME/bin:$HOME/.local/bin:$PATH
COPY --from=base \
$STI_SCRIPTS_PATH/assemble \
$STI_SCRIPTS_PATH/init-wrapper \
$STI_SCRIPTS_PATH/run \
$STI_SCRIPTS_PATH/usage \
$STI_SCRIPTS_PATH/
COPY --from=base \
$APP_ROOT/etc/generate_container_user \
$APP_ROOT/etc/
ENV BASH_ENV=${APP_ROOT}/bin/activate \
ENV=${APP_ROOT}/bin/activate \
PROMPT_COMMAND=". ${APP_ROOT}/bin/activate"
RUN <<-EOR
set -ex
microdnf install -y \
nss_wrapper \
python3.12 \
python3.12-pip-wheel
microdnf clean all
python3.12 -mvenv ${APP_ROOT}
python3.12 -mpip install /usr/share/python3.12-wheels/*.whl
# package is missing from EPEL0 so we install from pip
python3.12 -mpip install build
chown -R 1001:0 ${APP_ROOT}
fix-permissions ${APP_ROOT} -P
rpm-file-permissions
EOR
USER 1001
CMD $STI_SCRIPTS_PATH/usage