forked from Aber-s-practice/upload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 801 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
FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install -y python3.6 \
&& apt-get install -y python3-pip
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
# Python, don't write bytecode!
ENV PYTHONDONTWRITEBYTECODE 1
RUN apt-get install -y git
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY requirements.txt ./
# Install any needed packages specified in requirements.txt
RUN pip3 install -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . /app
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
ENV MEDIA_DIR="/app/image"
# Run app.py when the container launches
CMD ["python3", "manage.py", "--host=0.0.0.0", "--port=80", "start"]