-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also bumping Go version for 2.8 branch, bumping xcaddy to 0.4.3, dist to latest commit. My IDE was warning about `timezone: UTC` not being a valid timezone, switched to `Etc/UTC` which should work the same, I think.
- Loading branch information
1 parent
dc3d857
commit f5a951d
Showing
24 changed files
with
333 additions
and
32 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
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
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
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
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 +1 @@ | ||
FROM golang:1.22-alpine3.20 | ||
FROM golang:1.23-alpine3.20 |
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
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 +1 @@ | ||
FROM golang:1.22-windowsservercore-1809 | ||
FROM golang:1.23-windowsservercore-1809 |
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
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 +1 @@ | ||
FROM golang:1.22-windowsservercore-ltsc2022 | ||
FROM golang:1.23-windowsservercore-ltsc2022 |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
FROM alpine:3.20 | ||
|
||
RUN apk add --no-cache \ | ||
ca-certificates \ | ||
libcap \ | ||
mailcap | ||
|
||
RUN set -eux; \ | ||
mkdir -p \ | ||
/config/caddy \ | ||
/data/caddy \ | ||
/etc/caddy \ | ||
/usr/share/caddy \ | ||
; \ | ||
wget -O /etc/caddy/Caddyfile "https://github.com/caddyserver/dist/raw/33ae08ff08d168572df2956ed14fbc4949880d94/config/Caddyfile"; \ | ||
wget -O /usr/share/caddy/index.html "https://github.com/caddyserver/dist/raw/33ae08ff08d168572df2956ed14fbc4949880d94/welcome/index.html" | ||
|
||
# https://github.com/caddyserver/caddy/releases | ||
ENV CADDY_VERSION v2.9.0-beta.3 | ||
|
||
RUN set -eux; \ | ||
apkArch="$(apk --print-arch)"; \ | ||
case "$apkArch" in \ | ||
x86_64) binArch='amd64'; checksum='c38d63d3dc58e50cf6bb9af873f61c265624dcdaf5eb2de834f309148d0faed162f83d27b073e729318e63f28cd2958c93a5e0467fbbaf82624b54925dec97dc' ;; \ | ||
armhf) binArch='armv6'; checksum='aadf515dc43ab035d75595414560c8d9168e4b5823feef441b7846170ac5c9d4ed382c2024b8c8fab2cb4000cb89612870aae9a15f355b15f5931c63b75e06b5' ;; \ | ||
armv7) binArch='armv7'; checksum='c9a189a4d92c4872d429a6f5dffb12a53237dbf8a98c45985d531ab71200d84a49c9d120026799035cb03cc8c75a37be07e65d590900976a82cdf6355f7872aa' ;; \ | ||
aarch64) binArch='arm64'; checksum='094c0f5a82dabafb707f050d637a2858f3ec0a4865d99f51808a76a30e4e2e466d4534ec48fd830b369c7c9e2bcdfb9fe3132fdbcf94dd3256d5f0bcc6b0b062' ;; \ | ||
ppc64el|ppc64le) binArch='ppc64le'; checksum='3dca4a42a50540f5256a49528dffcf6456a571392ac6bab628933e5dde0b344eca39920625982d426e741c4af3bc38a8a20373a082d9cd332a19e293c60738e5' ;; \ | ||
riscv64) binArch='riscv64'; checksum='ba28761fa1809061884dea5487f23b4aae19ce02902982ae424f1916489a7934056f2a18cff1a08808d545c5ea97022e3f5ca9a28e23aa9aa90a775a50fd93dc' ;; \ | ||
s390x) binArch='s390x'; checksum='fcd39452bd96f952eb66035acf1d3493a6f4884fcedcc52fae3dc700e3a1e280b862facf2d4a6a0150d652116796e368e73756169ca8924c34e102be4b0ab24f' ;; \ | ||
*) echo >&2 "error: unsupported architecture ($apkArch)"; exit 1 ;;\ | ||
esac; \ | ||
wget -O /tmp/caddy.tar.gz "https://github.com/caddyserver/caddy/releases/download/v2.9.0-beta.3/caddy_2.9.0-beta.3_linux_${binArch}.tar.gz"; \ | ||
echo "$checksum /tmp/caddy.tar.gz" | sha512sum -c; \ | ||
tar x -z -f /tmp/caddy.tar.gz -C /usr/bin caddy; \ | ||
rm -f /tmp/caddy.tar.gz; \ | ||
setcap cap_net_bind_service=+ep /usr/bin/caddy; \ | ||
chmod +x /usr/bin/caddy; \ | ||
caddy version | ||
|
||
# See https://caddyserver.com/docs/conventions#file-locations for details | ||
ENV XDG_CONFIG_HOME /config | ||
ENV XDG_DATA_HOME /data | ||
|
||
LABEL org.opencontainers.image.version=v2.9.0-beta.3 | ||
LABEL org.opencontainers.image.title=Caddy | ||
LABEL org.opencontainers.image.description="a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go" | ||
LABEL org.opencontainers.image.url=https://caddyserver.com | ||
LABEL org.opencontainers.image.documentation=https://caddyserver.com/docs | ||
LABEL org.opencontainers.image.vendor="Light Code Labs" | ||
LABEL org.opencontainers.image.licenses=Apache-2.0 | ||
LABEL org.opencontainers.image.source="https://github.com/caddyserver/caddy-docker" | ||
|
||
EXPOSE 80 | ||
EXPOSE 443 | ||
EXPOSE 443/udp | ||
EXPOSE 2019 | ||
|
||
WORKDIR /srv | ||
|
||
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM alpine:3.20 |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:80 | ||
|
||
route { | ||
teapot | ||
} |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM golang:1.23-alpine3.20 | ||
|
||
RUN apk add --no-cache \ | ||
ca-certificates \ | ||
git \ | ||
libcap | ||
|
||
ENV XCADDY_VERSION v0.4.3 | ||
# Configures xcaddy to build with this version of Caddy | ||
ENV CADDY_VERSION v2.9.0-beta.3 | ||
# Configures xcaddy to not clean up post-build (unnecessary in a container) | ||
ENV XCADDY_SKIP_CLEANUP 1 | ||
# Sets capabilities for output caddy binary to be able to bind to privileged ports | ||
ENV XCADDY_SETCAP 1 | ||
|
||
RUN set -eux; \ | ||
apkArch="$(apk --print-arch)"; \ | ||
case "$apkArch" in \ | ||
x86_64) binArch='amd64'; checksum='98a90298cc5f947c1eda7e900454c1c94b27bffefbca5ee7b844c42ede2816fec617c8c0c70d4e8564110c5f5f73f3f37a6c87d3f49fd201126c6cc17543c695' ;; \ | ||
armhf) binArch='armv6'; checksum='da22b8afc9b30c89bf2bdc66f6ac6ce1852cfb8ce46742412f2838228affa47bd33f83abee3ddadfd5d9e9493976f5ebe8a75f60db050dba6fe3f400b04c5b92' ;; \ | ||
armv7) binArch='armv7'; checksum='ace84f56fec6469841e0f712e09742b88a84543f74e66c87997b7895580c17225c1fc57d816e0cd19d8463471a65cfdf0d765cb3fc4f80d1045d4454ba358f90' ;; \ | ||
aarch64) binArch='arm64'; checksum='5f14afb791a25ccd8c4b54000e60f1df80c50a3969a0ea667eb009c911eb673433714391bc62a51cd5f06e6f9c4f9173b942b40c306998ac412319e8e90335f0' ;; \ | ||
ppc64el|ppc64le) binArch='ppc64le'; checksum='48e9bddb9f05fa8ca91a9631685f4cb4a18c9bd7cbae2e1fe03f463ecb1584505722dcf8110b3cf7e43dcd08445bbe69713f221140da1f53d562e82907e08d7d' ;; \ | ||
riscv64) binArch='riscv64'; checksum='6c2dbe83713978b5cbad6c1365a9e24868a993c38528a42d6844357a1acb43ace4ebb9b5deeade00378540cc8dafd9a8ab99e007c78610d0488469a4aad41653' ;; \ | ||
s390x) binArch='s390x'; checksum='5230961c467734555a8e3f6a8183612e9345b67a390b96f2ba26d2a4ad8db67ecaaa7fcd5898faa25a0ce313f1aa905843e0ce760fc14ffbcaa7651d858654c2' ;; \ | ||
*) echo >&2 "error: unsupported architecture ($apkArch)"; exit 1 ;;\ | ||
esac; \ | ||
wget -O /tmp/xcaddy.tar.gz "https://github.com/caddyserver/xcaddy/releases/download/v0.4.3/xcaddy_0.4.3_linux_${binArch}.tar.gz"; \ | ||
echo "$checksum /tmp/xcaddy.tar.gz" | sha512sum -c; \ | ||
tar x -z -f /tmp/xcaddy.tar.gz -C /usr/bin xcaddy; \ | ||
rm -f /tmp/xcaddy.tar.gz; \ | ||
chmod +x /usr/bin/xcaddy; | ||
|
||
COPY caddy-builder.sh /usr/bin/caddy-builder | ||
|
||
WORKDIR /usr/bin |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM golang:1.23-alpine3.20 |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
args="" | ||
for p; do | ||
args="$args --with $p" | ||
done | ||
|
||
echo "Warning: the caddy-builder script is deprecated and will be removed in the future. | ||
Instead, you should use the xcaddy command: | ||
xcaddy build $args | ||
" >&2 | ||
|
||
# version is inferred from $CADDY_VERSION (set in the Dockerfile) | ||
# output will be placed in the working dir (/usr/bin as set in the Dockerfile) | ||
xcaddy build $args |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:1.23-windowsservercore-1809 | ||
|
||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | ||
|
||
ENV XCADDY_VERSION v0.4.3 | ||
# Configures xcaddy to build with this version of Caddy | ||
ENV CADDY_VERSION v2.9.0-beta.3 | ||
# Configures xcaddy to not clean up post-build (unnecessary in a container) | ||
ENV XCADDY_SKIP_CLEANUP 1 | ||
|
||
RUN Invoke-WebRequest \ | ||
-Uri "https://github.com/caddyserver/xcaddy/releases/download/v0.4.3/xcaddy_0.4.3_windows_amd64.zip" \ | ||
-OutFile "/xcaddy.zip"; \ | ||
if (!(Get-FileHash -Path /xcaddy.zip -Algorithm SHA512).Hash.ToLower().Equals('3d2cc64049cc056c51d4dd8be2f1b12e947c0e45a173aa4333815685373dc3c07c4c2ea438a8c9a33f0e0b1220552431394fdc2d966887a30f894bbca1a46128')) { exit 1; }; \ | ||
Expand-Archive -Path "/xcaddy.zip" -DestinationPath "/" -Force; \ | ||
Remove-Item "/xcaddy.zip" -Force | ||
|
||
WORKDIR / |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM golang:1.23-windowsservercore-1809 |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:1.23-windowsservercore-ltsc2022 | ||
|
||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | ||
|
||
ENV XCADDY_VERSION v0.4.3 | ||
# Configures xcaddy to build with this version of Caddy | ||
ENV CADDY_VERSION v2.9.0-beta.3 | ||
# Configures xcaddy to not clean up post-build (unnecessary in a container) | ||
ENV XCADDY_SKIP_CLEANUP 1 | ||
|
||
RUN Invoke-WebRequest \ | ||
-Uri "https://github.com/caddyserver/xcaddy/releases/download/v0.4.3/xcaddy_0.4.3_windows_amd64.zip" \ | ||
-OutFile "/xcaddy.zip"; \ | ||
if (!(Get-FileHash -Path /xcaddy.zip -Algorithm SHA512).Hash.ToLower().Equals('3d2cc64049cc056c51d4dd8be2f1b12e947c0e45a173aa4333815685373dc3c07c4c2ea438a8c9a33f0e0b1220552431394fdc2d966887a30f894bbca1a46128')) { exit 1; }; \ | ||
Expand-Archive -Path "/xcaddy.zip" -DestinationPath "/" -Force; \ | ||
Remove-Item "/xcaddy.zip" -Force | ||
|
||
WORKDIR / |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM golang:1.23-windowsservercore-ltsc2022 |
Oops, something went wrong.