File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
- FROM python:3.10-slim-bullseye as base
1
+ FROM python:3.10-alpine as base
2
2
3
3
FROM base as builder
4
4
5
5
ENV PYTHONUNBUFFERED 1
6
6
7
- RUN apt-get update && apt-get -y install build-essential libssl-dev libffi-dev python3-dev cargo libpq-dev && \
7
+ RUN apk update &&\
8
+ apk add python3-dev musl-dev build-base gcc libffi-dev libressl-dev postgresql-dev cargo &&\
9
+ rm -rf /var/cache/apk/* &&\
8
10
mkdir /install
9
11
WORKDIR /install
10
12
COPY requirements.txt .
11
- RUN python -m pip install --no-cache-dir --upgrade pip && \
12
- pip install --prefix=/install --no-cache-dir -r requirements.txt && \
13
- rm -rf /var/lib/apt/lists/* && \
14
- apt-get clean
13
+ RUN python -m pip install --no-cache-dir --upgrade pip &&\
14
+ pip install --prefix=/install --no-cache-dir -r requirements.txt
15
15
16
16
FROM base
17
17
18
18
COPY --from=builder /install /usr/local
19
19
COPY app /app
20
20
WORKDIR /app
21
- RUN apt-get update && \
22
- apt-get -y install iputils-ping nmap curl && \
23
- rm -rf /var/lib/apt/lists /*
21
+ RUN apk update &&\
22
+ apk add iputils nmap curl bash && \
23
+ rm -rf /var/cache/apk /*
24
24
25
25
HEALTHCHECK --interval=10s \
26
26
CMD curl -fs "http://localhost:$DJANGO_PORT/health/" || exit 1
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ services:
27
27
- upsnap_postgres
28
28
upsnap_redis :
29
29
container_name : upsnap_redis
30
- image : redis:6
30
+ image : redis:alpine
31
31
ports :
32
32
- " 6379:6379"
33
33
restart : unless-stopped
You can’t perform that action at this time.
0 commit comments