-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (25 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
27 lines (25 loc) · 1.01 KB
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
FROM python:3.7-slim
ENV PYTHONUNBUFFERED=1 DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8 PYTHONPATH=$PYTHONPATH:/jokesmith/
RUN mkdir /jokesmith
WORKDIR /jokesmith
COPY requirements.txt /jokesmith/
RUN apt-get -qq update \
&& mkdir -p /usr/share/man/man1/ && mkdir -p /usr/share/man/man3/ && mkdir -p /usr/share/man/man7/ \
&& apt-get -qq install -yq --no-install-recommends postgresql postgresql-client libpq-dev locales build-essential libssl-dev libffi-dev netbase \
python-dev \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
&& pip install pip --upgrade
# Requirements are installed here to ensure they will be cached.
COPY ./requirements.txt /requirements.txt
RUN pip install -r /requirements.txt \
&& apt-get remove --purge -yqq build-essential python-dev \
&& apt-get clean \
&& rm -rf \
~/.cache/pip/* \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/share/man \
/usr/share/doc \
/usr/share/doc-base
COPY . /jokesmith/