-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile_template
36 lines (26 loc) · 1.03 KB
/
Dockerfile_template
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
FROM {image}
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential software-properties-common cmake curl python3-dev x11-apps zlib1g zlib1g-dev \
libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa-dev xvfb x11-utils libasio-dev git pkg-config && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y libsm6 libxext6 libxrender1 git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN if [ ! -e /usr/bin/python ]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
curl -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py
COPY requirements.txt /tmp
RUN pip --no-cache-dir install -r /tmp/requirements.txt
ARG uid=1000
ARG gid=1000
RUN (groupadd -g ${gid} app || echo "gid ${gid} already exits") && \
useradd -u ${uid} -g ${gid} -r app && \
mkdir /home/app && \
chown ${uid}:${gid} -R /home/app
WORKDIR /home/app
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
EXPOSE 6006
ENTRYPOINT ["/home/app/entrypoint.sh"]