-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
40 lines (28 loc) · 874 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
37
38
39
40
#I specify the parent base image which is the python version 3.7
FROM python:3.7
MAINTAINER aminu israel <aminuisrael2@gmail.com>
# This prevents Python from writing out pyc files
ENV PYTHONDONTWRITEBYTECODE 1
# This keeps Python from buffering stdin/stdout
ENV PYTHONUNBUFFERED 1
# install system dependencies
RUN apt-get update \
&& apt-get -y install gcc make \
&& rm -rf /var/lib/apt/lists/*
# install dependencies
RUN pip install --no-cache-dir --upgrade pip
# set work directory
WORKDIR /src/app
# copy requirements.txt
COPY ./requirements.txt /src/app/requirements.txt
# install project requirements
RUN pip install --no-cache-dir -r requirements.txt
# copy project
COPY . .
# set work directory
WORKDIR /src/app
# set app port
EXPOSE 9090
ENTRYPOINT [ "python" ]
# Run app.py when the container launches
CMD [ "app.py","run","--host","0.0.0.0"]