Skip to content

Commit

Permalink
Caddy v2.9.0-beta.3
Browse files Browse the repository at this point in the history
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
francislavoie committed Nov 5, 2024
1 parent dc3d857 commit f5a951d
Show file tree
Hide file tree
Showing 24 changed files with 333 additions and 32 deletions.
54 changes: 48 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/dependabot.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ updates:
schedule:
interval: daily
time: "02:00"
timezone: UTC
timezone: Etc/UTC
open-pull-requests-limit: 10
{{- end }}{{ end }}
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions 2.8/builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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; \
Expand Down
2 changes: 1 addition & 1 deletion 2.8/builder/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM golang:1.22-alpine3.20
FROM golang:1.23-alpine3.20
8 changes: 4 additions & 4 deletions 2.8/windows-builder/1809/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion 2.8/windows-builder/1809/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM golang:1.22-windowsservercore-1809
FROM golang:1.23-windowsservercore-1809
8 changes: 4 additions & 4 deletions 2.8/windows-builder/ltsc2022/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion 2.8/windows-builder/ltsc2022/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM golang:1.22-windowsservercore-ltsc2022
FROM golang:1.23-windowsservercore-ltsc2022
61 changes: 61 additions & 0 deletions 2.9/alpine/Dockerfile
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"]
1 change: 1 addition & 0 deletions 2.9/alpine/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM alpine:3.20
5 changes: 5 additions & 0 deletions 2.9/builder/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:80

route {
teapot
}
36 changes: 36 additions & 0 deletions 2.9/builder/Dockerfile
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
1 change: 1 addition & 0 deletions 2.9/builder/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM golang:1.23-alpine3.20
17 changes: 17 additions & 0 deletions 2.9/builder/caddy-builder.sh
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
18 changes: 18 additions & 0 deletions 2.9/windows-builder/1809/Dockerfile
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 /
1 change: 1 addition & 0 deletions 2.9/windows-builder/1809/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM golang:1.23-windowsservercore-1809
18 changes: 18 additions & 0 deletions 2.9/windows-builder/ltsc2022/Dockerfile
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 /
1 change: 1 addition & 0 deletions 2.9/windows-builder/ltsc2022/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM golang:1.23-windowsservercore-ltsc2022
Loading

0 comments on commit f5a951d

Please sign in to comment.