File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -4,30 +4,31 @@ FROM python:3.13-slim as builder
4
4
ENV PIPENV_VENV_IN_PROJECT=1
5
5
6
6
# Copy your application source to the container
7
- # (make sure you create a .dockerignore file if any large files or directories should be excluded)
8
7
WORKDIR /usr/src/
9
8
ADD . /usr/src/
10
9
11
- # Install build deps, then run `pip install`, then remove unneeded build deps all in a single step.
12
- # Correct the path to your production requirements file, if needed.
13
- WORKDIR /usr/src/
10
+ # Install build deps, then install pipenv & dependencies
14
11
RUN set -ex \
15
12
&& BUILD_DEPS=" \
16
- build-essential \
17
- curl \
18
- \
13
+ build-essential \
14
+ curl \
19
15
" \
20
16
&& apt-get update && apt-get install -y --no-install-recommends $BUILD_DEPS \
21
17
&& python -m pip install --upgrade pip \
22
18
&& pip install pipenv \
23
19
&& pipenv sync --dev \
20
+ # Optionally run tests here:
24
21
# && pipenv run pytest \
25
22
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $BUILD_DEPS \
26
23
&& rm -rf /var/lib/apt/lists/*
27
24
28
25
29
26
FROM python:3.13-slim as runtime
30
27
28
+ # ✅ Install CA certificates so TLS works with Let's Encrypt
29
+ RUN apt-get update \
30
+ && apt-get install -y --no-install-recommends ca-certificates \
31
+ && rm -rf /var/lib/apt/lists/*
31
32
32
33
COPY --from=builder /usr/src/ /usr/src/
33
34
WORKDIR /usr/src/
You can’t perform that action at this time.
0 commit comments