forked from django/djangoproject.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (40 loc) · 1.1 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
39
40
41
42
43
44
45
46
47
48
# pull official base image
FROM python:3.8-slim-bullseye
# set work directory
WORKDIR /usr/src/app
# set environment varibles
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install deb packages
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends \
gettext \
git \
make \
netcat-openbsd \
npm \
postgresql-client-13 \
rsync \
&& rm -rf /var/lib/apt/lists/*
# install python dependencies
COPY ./requirements ./requirements
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends \
gcc \
libc6-dev \
libpq-dev \
&& python3 -m pip install --no-cache-dir -r requirements/tests.txt \
&& apt-get purge --assume-yes --auto-remove \
gcc \
libc6-dev \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# install node dependencies
COPY ./package.json ./package.json
RUN npm install
# copy docker-entrypoint.sh
COPY ./docker-entrypoint.sh ./docker-entrypoint.sh
# copy project
COPY . .
# run docker-entrypoint.sh
ENTRYPOINT ["./docker-entrypoint.sh"]