-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (39 loc) · 1.2 KB
/
Dockerfile
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
FROM registry.access.redhat.com/ubi9/python-312:9.5 as base
FROM ghcr.io/radiorabe/s2i-base:2.3.0
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/scl_enable \
$APP_ROOT/etc/
ENV BASH_ENV=${APP_ROOT}/etc/scl_enable \
ENV=${APP_ROOT}/etc/scl_enable \
PROMPT_COMMAND=". ${APP_ROOT}/etc/scl_enable"
RUN 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 \
&& python3.12 -mpip install build \
&& chown -R 1001:0 ${APP_ROOT} \
&& fix-permissions ${APP_ROOT} -P \
&& rpm-file-permissions
USER 1001
CMD $STI_SCRIPTS_PATH/usage