-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (24 loc) · 670 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
# Pull official base image
FROM python:3.8.2-alpine
# Set work directory
WORKDIR /usr/src/portfolio
# Set the environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Install psycopg2 dependencies
RUN apk update \
&& apk add postgresql-dev gcc python3-dev musl-dev
# Install Pillow dependencies
RUN apk add jpeg-dev zlib-dev
# Install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
COPY ./requirements-dev.txt .
RUN pip install -r requirements-dev.txt
# Copy entrypoint.sh
COPY ./entrypoint.sh .
RUN chmod +x entrypoint.sh
# Copy project
COPY . .
# Run entrypoint.sh
ENTRYPOINT [ "/usr/src/portfolio/entrypoint.sh" ]