-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
43 lines (34 loc) · 942 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
41
42
43
FROM python:3.10.6-alpine3.16
# enables proper stdout flushing
ENV PYTHONUNBUFFERED yes
# no .pyc files
ENV PYTHONDONTWRITEBYTECODE yes
# pip optimizations
ENV PIP_NO_CACHE_DIR yes
ENV PIP_DISABLE_PIP_VERSION_CHECK yes
WORKDIR /src
COPY poetry.lock pyproject.toml ./
RUN apk update && \
apk add --no-cache libpq npm \
&& apk add --no-cache --virtual .build-deps \
# https://cryptography.io/en/latest/installation/#alpine
gcc \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev \
cargo \
postgresql-dev \
&& pip install poetry \
&& poetry config virtualenvs.create false \
&& poetry install --no-dev \
&& apk del --purge .build-deps
COPY src .
RUN cd django_ckeditor_5/ && \
npm install && \
npm run prod
RUN mkdir -p /home/website/staticfiles
RUN mkdir -p /home/website/media
RUN sed -i 's/\r$//g' entrypoint.sh
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]