-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
37 lines (25 loc) · 977 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.9-bullseye
LABEL maintainer="IETF Tools Team <[email protected]>"
# Update system packages
RUN apt-get update \
&& apt-get -qy upgrade \
&& apt-get -y install --no-install-recommends apt-utils dialog locales 2>&1
# Set locale to en_US.UTF-8
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
echo "LANG=en_US.UTF-8" > /etc/locale.conf && \
dpkg-reconfigure locales && \
locale-gen en_US.UTF-8 && \
update-locale LC_ALL en_US.UTF-8
RUN apt-get -y install mariadb-client nginx 2>&1
EXPOSE 8002:8002
RUN mkdir /code
WORKDIR /code
# Doing this step before copying the whole codebase improves docker's ability to reuse cached layers at build time
COPY ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt
COPY . /code/
RUN mkdir /code/logs
RUN mkdir /code/static
ENV DJANGO_SETTINGS_MODULE=ietf_guides.settings.prod
ENTRYPOINT ./docker-entry.sh