diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3ac8888..0030f9b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,40 +5,82 @@ updates: schedule: interval: daily time: "02:00" - timezone: UTC + timezone: Etc/UTC open-pull-requests-limit: 10 - package-ecosystem: docker directory: "/2.8/builder" schedule: interval: daily time: "02:00" - timezone: UTC + timezone: Etc/UTC open-pull-requests-limit: 10 - package-ecosystem: docker directory: "/2.8/windows/1809" schedule: interval: daily time: "02:00" - timezone: UTC + timezone: Etc/UTC open-pull-requests-limit: 10 - package-ecosystem: docker directory: "/2.8/windows/ltsc2022" schedule: interval: daily time: "02:00" - timezone: UTC + timezone: Etc/UTC open-pull-requests-limit: 10 - package-ecosystem: docker directory: "/2.8/windows-builder/1809" schedule: interval: daily time: "02:00" - timezone: UTC + timezone: Etc/UTC open-pull-requests-limit: 10 - package-ecosystem: docker directory: "/2.8/windows-builder/ltsc2022" schedule: interval: daily time: "02:00" - timezone: UTC + timezone: Etc/UTC + open-pull-requests-limit: 10 +- package-ecosystem: docker + directory: "/2.9/alpine" + schedule: + interval: daily + time: "02:00" + timezone: Etc/UTC + open-pull-requests-limit: 10 +- package-ecosystem: docker + directory: "/2.9/builder" + schedule: + interval: daily + time: "02:00" + timezone: Etc/UTC + open-pull-requests-limit: 10 +- package-ecosystem: docker + directory: "/2.9/windows/1809" + schedule: + interval: daily + time: "02:00" + timezone: Etc/UTC + open-pull-requests-limit: 10 +- package-ecosystem: docker + directory: "/2.9/windows/ltsc2022" + schedule: + interval: daily + time: "02:00" + timezone: Etc/UTC + open-pull-requests-limit: 10 +- package-ecosystem: docker + directory: "/2.9/windows-builder/1809" + schedule: + interval: daily + time: "02:00" + timezone: Etc/UTC + open-pull-requests-limit: 10 +- package-ecosystem: docker + directory: "/2.9/windows-builder/ltsc2022" + schedule: + interval: daily + time: "02:00" + timezone: Etc/UTC open-pull-requests-limit: 10 diff --git a/.github/dependabot.yml.tmpl b/.github/dependabot.yml.tmpl index e066bc9..0fd4692 100644 --- a/.github/dependabot.yml.tmpl +++ b/.github/dependabot.yml.tmpl @@ -6,6 +6,6 @@ updates: schedule: interval: daily time: "02:00" - timezone: UTC + timezone: Etc/UTC open-pull-requests-limit: 10 {{- end }}{{ end }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 69de6a1..d7b0da0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,8 +18,8 @@ jobs: - uses: actions/checkout@master - name: non-master build test run: | - docker build -f 2.8/alpine/Dockerfile 2.8/alpine - docker build -f 2.8/builder/Dockerfile 2.8/builder + docker build -f 2.9/alpine/Dockerfile 2.9/alpine + docker build -f 2.9/builder/Dockerfile 2.9/builder if: github.repository != 'caddyserver/caddy-docker' || github.ref != 'refs/heads/master' - name: build run: bashbrew build caddy @@ -43,7 +43,7 @@ jobs: - uses: actions/checkout@master - name: non-master build test run: | - docker build -f 2.8/windows/1809/Dockerfile 2.8/windows + docker build -f 2.9/windows/1809/Dockerfile 2.9/windows if: github.repository != 'caddyserver/caddy-docker' || github.ref != 'refs/heads/master' - name: install bashbrew run: curl -o /bashbrew.exe https://doi-janky.infosiftr.net/job/bashbrew/job/master/lastSuccessfulBuild/artifact/bashbrew-windows-amd64.exe diff --git a/2.8/builder/Dockerfile b/2.8/builder/Dockerfile index 502092d..a39ceb8 100644 --- a/2.8/builder/Dockerfile +++ b/2.8/builder/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.22-alpine3.20 +FROM golang:1.23-alpine3.20 RUN apk add --no-cache \ ca-certificates \ git \ libcap -ENV XCADDY_VERSION v0.4.2 +ENV XCADDY_VERSION v0.4.3 # Configures xcaddy to build with this version of Caddy ENV CADDY_VERSION v2.8.4 # Configures xcaddy to not clean up post-build (unnecessary in a container) @@ -16,16 +16,16 @@ ENV XCADDY_SETCAP 1 RUN set -eux; \ apkArch="$(apk --print-arch)"; \ case "$apkArch" in \ - x86_64) binArch='amd64'; checksum='a726e4b7992f3c6c11c585b6100f796f035c6757d247110c6af9bb4f218b7ec67d07db0013c6834e9b881582d75ba4fe8e78f6ca5883b1017da6b5407d1ca25c' ;; \ - armhf) binArch='armv6'; checksum='c0a94f2e59547fe5d4793ec2447ba0b832731c7b1387ae3c90e43f081da57ad68ab506de43ad91a35754a779b591dc5a39a92b6cf3b5ef352622cfb811e92157' ;; \ - armv7) binArch='armv7'; checksum='4820d03ed4a805cf52803725fd1eda9d96f15692ab3cd2803fe91e676f1a24a48b31c4e6a1ec043e5f7f077f302e003e4997ca620c9674ed65e7804417a91af6' ;; \ - aarch64) binArch='arm64'; checksum='41033dc721e799583eac2014b6e409d65a704d0a4360c131662aa651e7fbd129dce03c460661a51e0ba192d27fb3af19faa054da8c037c642b24a12124f6d4a8' ;; \ - ppc64el|ppc64le) binArch='ppc64le'; checksum='ea454e90519f46eeaf785a5789d455a01378dc543838d0b57448509036f3a215913c8a6e1fcb0b9249e9b941f29a29257367609e1ef7ce7f2e0522c768eaf2cf' ;; \ - riscv64) binArch='riscv64'; checksum='afaf940189942adfe0518d06b42f2624f387a02d88ce9ec5f8cc5a99347e032e2dcae3e3cd5856ac1a6ce107a7654e62b04f635f1dd891ca192b23758946b45b' ;; \ - s390x) binArch='s390x'; checksum='d8d3bf402107dad8f07ed9d5df008b3f6cfd021c93d00f6fc31c641d69649255f2e95d65a46553fb06bf9738158d0ba92d3bbd548e878f4569523b6e6fdeacb5' ;; \ + 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.2/xcaddy_0.4.2_linux_${binArch}.tar.gz"; \ + 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; \ diff --git a/2.8/builder/Dockerfile.base b/2.8/builder/Dockerfile.base index 9a3c601..e927fe5 100644 --- a/2.8/builder/Dockerfile.base +++ b/2.8/builder/Dockerfile.base @@ -1 +1 @@ -FROM golang:1.22-alpine3.20 +FROM golang:1.23-alpine3.20 diff --git a/2.8/windows-builder/1809/Dockerfile b/2.8/windows-builder/1809/Dockerfile index a09463c..f3976ad 100644 --- a/2.8/windows-builder/1809/Dockerfile +++ b/2.8/windows-builder/1809/Dockerfile @@ -1,17 +1,17 @@ -FROM golang:1.22-windowsservercore-1809 +FROM golang:1.23-windowsservercore-1809 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV XCADDY_VERSION v0.4.2 +ENV XCADDY_VERSION v0.4.3 # Configures xcaddy to build with this version of Caddy ENV CADDY_VERSION v2.8.4 # 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.2/xcaddy_0.4.2_windows_amd64.zip" \ + -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('8ef75d6141029a1f2a2b5aefdee44f0704366302c7416e2136341a3c5910d7809e713cf3d965512f1440473b99c177a0d19789e20601628462747a2d6bc71d27')) { exit 1; }; \ + 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 diff --git a/2.8/windows-builder/1809/Dockerfile.base b/2.8/windows-builder/1809/Dockerfile.base index 54f348c..e544bde 100644 --- a/2.8/windows-builder/1809/Dockerfile.base +++ b/2.8/windows-builder/1809/Dockerfile.base @@ -1 +1 @@ -FROM golang:1.22-windowsservercore-1809 +FROM golang:1.23-windowsservercore-1809 diff --git a/2.8/windows-builder/ltsc2022/Dockerfile b/2.8/windows-builder/ltsc2022/Dockerfile index 1671a5a..6897311 100644 --- a/2.8/windows-builder/ltsc2022/Dockerfile +++ b/2.8/windows-builder/ltsc2022/Dockerfile @@ -1,17 +1,17 @@ -FROM golang:1.22-windowsservercore-ltsc2022 +FROM golang:1.23-windowsservercore-ltsc2022 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV XCADDY_VERSION v0.4.2 +ENV XCADDY_VERSION v0.4.3 # Configures xcaddy to build with this version of Caddy ENV CADDY_VERSION v2.8.4 # 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.2/xcaddy_0.4.2_windows_amd64.zip" \ + -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('8ef75d6141029a1f2a2b5aefdee44f0704366302c7416e2136341a3c5910d7809e713cf3d965512f1440473b99c177a0d19789e20601628462747a2d6bc71d27')) { exit 1; }; \ + 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 diff --git a/2.8/windows-builder/ltsc2022/Dockerfile.base b/2.8/windows-builder/ltsc2022/Dockerfile.base index 9fe5d5c..f9da03e 100644 --- a/2.8/windows-builder/ltsc2022/Dockerfile.base +++ b/2.8/windows-builder/ltsc2022/Dockerfile.base @@ -1 +1 @@ -FROM golang:1.22-windowsservercore-ltsc2022 +FROM golang:1.23-windowsservercore-ltsc2022 diff --git a/2.9/alpine/Dockerfile b/2.9/alpine/Dockerfile new file mode 100644 index 0000000..3be62d6 --- /dev/null +++ b/2.9/alpine/Dockerfile @@ -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"] diff --git a/2.9/alpine/Dockerfile.base b/2.9/alpine/Dockerfile.base new file mode 100644 index 0000000..abf8b7c --- /dev/null +++ b/2.9/alpine/Dockerfile.base @@ -0,0 +1 @@ +FROM alpine:3.20 diff --git a/2.9/builder/Caddyfile b/2.9/builder/Caddyfile new file mode 100644 index 0000000..14ff433 --- /dev/null +++ b/2.9/builder/Caddyfile @@ -0,0 +1,5 @@ +:80 + +route { + teapot +} diff --git a/2.9/builder/Dockerfile b/2.9/builder/Dockerfile new file mode 100644 index 0000000..e4e51b7 --- /dev/null +++ b/2.9/builder/Dockerfile @@ -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 diff --git a/2.9/builder/Dockerfile.base b/2.9/builder/Dockerfile.base new file mode 100644 index 0000000..e927fe5 --- /dev/null +++ b/2.9/builder/Dockerfile.base @@ -0,0 +1 @@ +FROM golang:1.23-alpine3.20 diff --git a/2.9/builder/caddy-builder.sh b/2.9/builder/caddy-builder.sh new file mode 100755 index 0000000..cd4b699 --- /dev/null +++ b/2.9/builder/caddy-builder.sh @@ -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 diff --git a/2.9/windows-builder/1809/Dockerfile b/2.9/windows-builder/1809/Dockerfile new file mode 100644 index 0000000..f7502d9 --- /dev/null +++ b/2.9/windows-builder/1809/Dockerfile @@ -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 / diff --git a/2.9/windows-builder/1809/Dockerfile.base b/2.9/windows-builder/1809/Dockerfile.base new file mode 100644 index 0000000..e544bde --- /dev/null +++ b/2.9/windows-builder/1809/Dockerfile.base @@ -0,0 +1 @@ +FROM golang:1.23-windowsservercore-1809 diff --git a/2.9/windows-builder/ltsc2022/Dockerfile b/2.9/windows-builder/ltsc2022/Dockerfile new file mode 100644 index 0000000..0641231 --- /dev/null +++ b/2.9/windows-builder/ltsc2022/Dockerfile @@ -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 / diff --git a/2.9/windows-builder/ltsc2022/Dockerfile.base b/2.9/windows-builder/ltsc2022/Dockerfile.base new file mode 100644 index 0000000..f9da03e --- /dev/null +++ b/2.9/windows-builder/ltsc2022/Dockerfile.base @@ -0,0 +1 @@ +FROM golang:1.23-windowsservercore-ltsc2022 diff --git a/2.9/windows/1809/Dockerfile b/2.9/windows/1809/Dockerfile new file mode 100644 index 0000000..8cdf16c --- /dev/null +++ b/2.9/windows/1809/Dockerfile @@ -0,0 +1,47 @@ +FROM mcr.microsoft.com/windows/servercore:1809 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +RUN mkdir /config; \ + mkdir /data; \ + mkdir /etc/caddy; \ + mkdir /usr/share/caddy; \ + Invoke-WebRequest \ + -Uri "https://github.com/caddyserver/dist/raw/33ae08ff08d168572df2956ed14fbc4949880d94/config/Caddyfile" \ + -OutFile "/etc/caddy/Caddyfile"; \ + Invoke-WebRequest \ + -Uri "https://github.com/caddyserver/dist/raw/33ae08ff08d168572df2956ed14fbc4949880d94/welcome/index.html" \ + -OutFile "/usr/share/caddy/index.html" + +# https://github.com/caddyserver/caddy/releases +ENV CADDY_VERSION v2.9.0-beta.3 + +RUN Invoke-WebRequest \ + -Uri "https://github.com/caddyserver/caddy/releases/download/v2.9.0-beta.3/caddy_2.9.0-beta.3_windows_amd64.zip" \ + -OutFile "/caddy.zip"; \ + if (!(Get-FileHash -Path /caddy.zip -Algorithm SHA512).Hash.ToLower().Equals('582aab60c12764c75ef13523daf1c72e420b45883936440e47a1f006f0dd8a012f2dedec6c5304549ca2789cbc07b28894eac08b3b86050da9d4ff7f885ce8c3')) { exit 1; }; \ + Expand-Archive -Path "/caddy.zip" -DestinationPath "/" -Force; \ + Remove-Item "/caddy.zip" -Force + +# See https://caddyserver.com/docs/conventions#file-locations for details +ENV XDG_CONFIG_HOME c:/config +ENV XDG_DATA_HOME c:/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 + +# Make sure it runs and reports its version +RUN ["caddy", "version"] + +CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] diff --git a/2.9/windows/1809/Dockerfile.base b/2.9/windows/1809/Dockerfile.base new file mode 100644 index 0000000..23c99ad --- /dev/null +++ b/2.9/windows/1809/Dockerfile.base @@ -0,0 +1 @@ +FROM mcr.microsoft.com/windows/servercore:1809 diff --git a/2.9/windows/ltsc2022/Dockerfile b/2.9/windows/ltsc2022/Dockerfile new file mode 100644 index 0000000..ad12ed8 --- /dev/null +++ b/2.9/windows/ltsc2022/Dockerfile @@ -0,0 +1,47 @@ +FROM mcr.microsoft.com/windows/servercore:ltsc2022 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +RUN mkdir /config; \ + mkdir /data; \ + mkdir /etc/caddy; \ + mkdir /usr/share/caddy; \ + Invoke-WebRequest \ + -Uri "https://github.com/caddyserver/dist/raw/33ae08ff08d168572df2956ed14fbc4949880d94/config/Caddyfile" \ + -OutFile "/etc/caddy/Caddyfile"; \ + Invoke-WebRequest \ + -Uri "https://github.com/caddyserver/dist/raw/33ae08ff08d168572df2956ed14fbc4949880d94/welcome/index.html" \ + -OutFile "/usr/share/caddy/index.html" + +# https://github.com/caddyserver/caddy/releases +ENV CADDY_VERSION v2.9.0-beta.3 + +RUN Invoke-WebRequest \ + -Uri "https://github.com/caddyserver/caddy/releases/download/v2.9.0-beta.3/caddy_2.9.0-beta.3_windows_amd64.zip" \ + -OutFile "/caddy.zip"; \ + if (!(Get-FileHash -Path /caddy.zip -Algorithm SHA512).Hash.ToLower().Equals('582aab60c12764c75ef13523daf1c72e420b45883936440e47a1f006f0dd8a012f2dedec6c5304549ca2789cbc07b28894eac08b3b86050da9d4ff7f885ce8c3')) { exit 1; }; \ + Expand-Archive -Path "/caddy.zip" -DestinationPath "/" -Force; \ + Remove-Item "/caddy.zip" -Force + +# See https://caddyserver.com/docs/conventions#file-locations for details +ENV XDG_CONFIG_HOME c:/config +ENV XDG_DATA_HOME c:/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 + +# Make sure it runs and reports its version +RUN ["caddy", "version"] + +CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] diff --git a/2.9/windows/ltsc2022/Dockerfile.base b/2.9/windows/ltsc2022/Dockerfile.base new file mode 100644 index 0000000..f6dcbd4 --- /dev/null +++ b/2.9/windows/ltsc2022/Dockerfile.base @@ -0,0 +1 @@ +FROM mcr.microsoft.com/windows/servercore:ltsc2022 diff --git a/stackbrew-config.yaml b/stackbrew-config.yaml index f67660e..d0a584a 100644 --- a/stackbrew-config.yaml +++ b/stackbrew-config.yaml @@ -1,10 +1,14 @@ versions: + - caddy_version: '2.9.0-beta.3' + is_major: false + is_latest: false + dist_commit: 33ae08ff08d168572df2956ed14fbc4949880d94 - caddy_version: '2.8.4' is_major: true is_latest: true dist_commit: 509c30cecd3cbc4012f6b1cc88d8f3f000fb06e4 xcaddy_config: - version: '0.4.2' + version: '0.4.3' # configuration for the stackbrew.tmpl template variants: - dir: alpine