File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,30 +4,31 @@ FROM python:3.13-slim as builder
44ENV PIPENV_VENV_IN_PROJECT=1
55
66# Copy your application source to the container
7- # (make sure you create a .dockerignore file if any large files or directories should be excluded)
87WORKDIR /usr/src/
98ADD . /usr/src/
109
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
1411RUN set -ex \
1512 && BUILD_DEPS=" \
16- build-essential \
17- curl \
18- \
13+ build-essential \
14+ curl \
1915 " \
2016 && apt-get update && apt-get install -y --no-install-recommends $BUILD_DEPS \
2117 && python -m pip install --upgrade pip \
2218 && pip install pipenv \
2319 && pipenv sync --dev \
20+ # Optionally run tests here:
2421 # && pipenv run pytest \
2522 && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $BUILD_DEPS \
2623 && rm -rf /var/lib/apt/lists/*
2724
2825
2926FROM python:3.13-slim as runtime
3027
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/*
3132
3233COPY --from=builder /usr/src/ /usr/src/
3334WORKDIR /usr/src/
You can’t perform that action at this time.
0 commit comments