-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading to Caddy 2.8.4 (and python 3.12)
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
FROM caddy:2.7.6-alpine | ||
FROM caddy:2.8.4-alpine | ||
LABEL org.opencontainers.image.source https://github.com/offspot/container-images | ||
|
||
RUN \ | ||
# openssl required to generate cert when CAPTIVE_PORTAL is on | ||
apk add --no-cache dumb-init python3 py3-pip && \ | ||
pip3 install --no-cache-dir -U pip && \ | ||
pip3 install --no-cache-dir Jinja2==3.1.2 | ||
apk add --no-cache dumb-init python3 \ | ||
&& python3 -m venv /usr/local/proxy-env \ | ||
&& /usr/local/proxy-env/bin/pip3 install --no-cache-dir -U pip \ | ||
&& /usr/local/proxy-env/bin/pip3 install --no-cache-dir Jinja2==3.1.2 | ||
|
||
COPY Caddyfile /etc/caddy/ | ||
COPY gen-caddyfile.py /src/ | ||
|
@@ -19,8 +20,8 @@ ENV IS_ONLINE_DEMO "" | |
ENV DEMO_TLS_EMAIL "[email protected]" | ||
|
||
# store python bytecode in image | ||
RUN python3 -m compileall /src/gen-caddyfile.py && mv /src/__pycache__/*.pyc /usr/local/lib/ | ||
RUN /usr/local/proxy-env/bin/python3 -m compileall /src/gen-caddyfile.py && mv /src/__pycache__/*.pyc /usr/local/lib/ | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/bin/python3", "/usr/local/lib/gen-caddyfile.cpython-311.pyc"] | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/proxy-env/bin/python3", "/usr/local/lib/gen-caddyfile.cpython-312.pyc"] | ||
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"] | ||
|