-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (15 loc) · 818 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
ARG PYTHON_VERSION=3.10
FROM python:${PYTHON_VERSION}-slim as base
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && apt-get --no-install-recommends install -y gcc g++ sqlite3 wget tmux
RUN mkdir -p /app
WORKDIR /app
COPY requirements.txt .
RUN --mount=type=cache,target=~/.cache pip install -U pip && pip install -r requirements.txt
COPY . .
RUN python manage.py collectstatic --noinput
EXPOSE 8080
RUN wget -O overmind.gz https://github.com/DarthSim/overmind/releases/download/v2.3.0/overmind-v2.3.0-linux-amd64.gz && gunzip overmind.gz && chmod +x overmind
CMD ["./overmind", "start"]