-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.dev
44 lines (35 loc) · 1.3 KB
/
Dockerfile.dev
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
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Upgrade packages and install locales
RUN echo "locales locales/default_environment_locale select en_US.UTF-8" | debconf-set-selections && \
echo "locales locales/locales_to_be_generated select en_US.UTF-8 UTF-8" | debconf-set-selections && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y locales
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
LANGUAGE=en_US:en
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# Install commonly used packages
# - libssl-dev, libffi-dev: required for Python cryptography module
RUN apt-get install -y \
python3-pip \
python3-dev \
build-essential \
libssl-dev \
libffi-dev \
inotify-tools \
wait-for-it \
git \
wget
# Create symlinks /usr/bin/python and /usr/bin/pip, but only if these files don't exist yet
RUN { [ -e /usr/bin/python ] || ln -s /usr/bin/python3 /usr/bin/python; } && \
{ [ -e /usr/bin/pip ] || ln -s /usr/bin/pip3 /usr/bin/pip; }
RUN mkdir -p /app
WORKDIR /app
COPY ./requirements.txt requirements-dev.txt .
RUN pip install --upgrade pip && \
pip install -r requirements.txt -r requirements-dev.txt
CMD ["python3", "runserver.py"]
EXPOSE 5000