-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
48 lines (37 loc) · 1.08 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
47
48
FROM python:3.6.8-slim-stretch
LABEL maintainer="Timothy Liu <[email protected]>"
USER root
ENV DEBIAN_FRONTEND noninteractive
# Install OS dependencies
RUN apt-get update && \
apt-get install -yq --no-install-recommends --no-upgrade \
apt-utils && \
apt-get install -yq --no-install-recommends --no-upgrade \
build-essential \
graphviz \
libgraphviz-dev \
pkg-config \
curl \
git \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV SHELL=/bin/bash \
NB_UID=1000 \
NB_GID=100 \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
WORKDIR /app
RUN groupadd wheel -g 11 && \
echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && \
useradd -m -s /bin/bash -N -u 1000 opensutd && \
chown opensutd:$NB_GID /app && \
chmod g+w /etc/passwd
# install Python dependencies
COPY . /app
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py && \
pip install --upgrade --no-cache-dir -r requirements.txt && \
rm -rf get-pip.py ~/.cache
USER root
EXPOSE 8000