-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
38 lines (28 loc) · 1.01 KB
/
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
37
38
FROM python:3.7.3-stretch
LABEL maintainer="notebooks@gesis.org"
RUN apt-get update -y && \
apt-get install -yq \
vim \
htop \
less && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# upgrade pip
RUN pip install --no-cache-dir --upgrade pip
# We copy just the requirements.txt first to leverage Docker cache
COPY requirements.txt /requirements.txt
RUN pip install --no-cache-dir -r /requirements.txt
COPY . /binder_gallery
WORKDIR /binder_gallery
ENV PYTHONUNBUFFERED=1
# tell the port number the container should expose
EXPOSE 5000
# run the application
CMD ["python", "-m", "binder_gallery"]
# run the application behind Gunicorn WSGI HTTP Server
#CMD ["gunicorn", "-b", "0.0.0.0:5000", "binder_gallery:app"]
# run the application behind Gunicorn WSGI HTTP Server with 4 worker processes
#CMD ["gunicorn", "-b", "0.0.0.0:5000", "-w", "4", "binder_gallery:app"]
# enable access logs
#CMD ["gunicorn", "--access-logfile=-", "-b", "0.0.0.0:5000", "binder_gallery:app"]