-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (21 loc) · 767 Bytes
/
Dockerfile
File metadata and controls
37 lines (21 loc) · 767 Bytes
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
FROM rootproject/root:6.22.02-ubuntu20.04
USER root
WORKDIR /opt
COPY packages /opt/packages
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq && apt-get -y install --no-install-recommends -y $(cat /opt/packages) \
&& rm -rf /var/lib/apt/lists/* \
&& echo /opt/root/lib >> /etc/ld.so.conf \
&& ldconfig \
&& apt-get clean
ARG USER=foo
RUN useradd -ms /bin/bash $USER
ENV PATH /usr/local/bin:/home/$USER/.local/bin:$PATH
COPY requirements.txt /home/$USER/requirements.txt
USER $USER
WORKDIR /home/$USER
RUN python3 -m pip install --upgrade pip --user \
&& python3 -m pip install --upgrade setuptools wheel --user \
&& python3 -m pip install -r requirements.txt --user \
&& python3 -m pip cache purge
CMD ["bash"]