-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (45 loc) · 1.39 KB
/
Dockerfile
File metadata and controls
50 lines (45 loc) · 1.39 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 docker.io/drycc/base:bullseye
RUN adduser --system \
--shell /bin/bash \
--disabled-password \
--home /workspace \
--group \
drycc
ENV PYTHON_VERSION="3.10.2" \
HELM_VERSION="3.8.0"
COPY . /workspace
WORKDIR /workspace
RUN buildDeps='musl-dev openssl' \
&& install-packages $buildDeps \
&& install-stack python $PYTHON_VERSION \
&& install-stack helm $HELM_VERSION && . init-stack \
&& python3 -m venv /workspace/.venv \
&& source /workspace/.venv/bin/activate \
&& pip3 install --disable-pip-version-check --no-cache-dir -r /workspace/requirements.txt \
&& chown -R drycc:drycc /workspace \
# set env
&& echo "source /workspace/.venv/bin/activate" >> /opt/drycc/python/profile.d/python.sh \
# cleanup
&& scanelp /workspace/.venv/lib > runtime.txt \
&& apt-get purge -y --auto-remove $buildDeps \
&& install-packages $(< runtime.txt) \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/`echo $(uname -m)`-linux-gnu/gconv/IBM* \
/usr/lib/`echo $(uname -m)`-linux-gnu/gconv/EBC* \
&& mkdir -p /usr/share/man/man{1..8}
USER drycc
WORKDIR /workspace
CMD ["/workspace/bin/boot"]
EXPOSE 8000