-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
36 lines (28 loc) · 900 Bytes
/
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
FROM python:3.10
EXPOSE 8000
ENV DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
VIRTUAL_ENV=/opt/venv \
MEPP_SRC_DIR=/usr/src/app \
UWSGI_USER=mepp \
UWSGI_GROUP=mepp
WORKDIR $MEPP_SRC_DIR/
COPY . ./
RUN apt-get -qq update && \
apt-get -qq -y install \
vim \
locales \
wait-for-it && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
RUN locale-gen && dpkg-reconfigure locales -f noninteractive
RUN adduser --disabled-password --gecos '' "$UWSGI_USER"
RUN python3 -m venv "$VIRTUAL_ENV"
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --quiet --upgrade pip && \
pip install --quiet -r "$MEPP_SRC_DIR/requirements.txt" 1>/dev/null && \
rm -rf ~/.cache/pip
CMD [ "/bin/bash", "-c", "exec /entrypoint.sh" ]