-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (20 loc) · 885 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
FROM python:3.10-alpine
SHELL [ "/bin/ash", "-c"]
EXPOSE 8000
RUN apk update && apk upgrade && \
apk add --no-cache bash curl && \
apk add --no-cache libc-dev libffi-dev openssl-dev gcc && \
apk add --no-cache build-base mariadb-dev && \
apk add --no-cache docker-compose
RUN pip install --upgrade pip
RUN adduser -D itsoda && chmod 777 /opt /run
WORKDIR /itsoda
RUN mkdir /itsoda/static && mkdir /itsoda/media && chown -R itsoda:itsoda /itsoda && chmod 777 /itsoda
COPY --chown=itsoda:itsoda . .
COPY pyproject.toml poetry.lock /itsoda/
RUN curl -L https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz \
| tar -C /usr/local/bin -xzvf - \
&& rm -f dockerize-linux-amd64-v0.6.1.tar.gz
RUN pip install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-root --no-interaction --no-ansi