Skip to content

Commit

Permalink
Caddy v2.9.0-beta.3 (#377)
Browse files Browse the repository at this point in the history
* Caddy v2.9.0-beta.3

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.

* Use xcaddy 0.4.4
  • Loading branch information
francislavoie authored Nov 6, 2024
1 parent dc3d857 commit 507b6b9
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.4
# 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='09b0bd09c879c2985c562deec675da074f896c9e114717d07f11bdb2714b7e9ecbb26748431732469c245e1517cde6e78ee6b0f6e839de3992d22a3d474188fe' ;; \
armhf) binArch='armv6'; checksum='dd1ee3d27bb9f0c2b6b900e19e779398c972fc7a0affaf19ee64fb01689cdd18e2df1429251607dbdeca1ad57d1851317c9f0c0c4c4ead3aa2b9e68678a62d52' ;; \
armv7) binArch='armv7'; checksum='e13003e727c228e84b1abb72db3f92362dd232087256ea51249002d4d0a17d002760123a33dafb8d47553d54c7d821f3d3dee419347a61f967ea4617abaef46a' ;; \
aarch64) binArch='arm64'; checksum='c04464f944ebad714ded44691d359cf27109f5e088f7ee7ed5b49941c88382b0d31c91b81cb1c11444371abe7c491df06aba7306503a17627a7826ac8992e02a' ;; \
ppc64el|ppc64le) binArch='ppc64le'; checksum='c05c883e3a6162b77454ed4efa1e28278d0624a53bb096dced95e27b61f60fdcc0a40e90524806fa07e2da654c6420995fede7077c2c2319351f8f0bc1855cd9' ;; \
riscv64) binArch='riscv64'; checksum='84d1e61330aed77373ffa91dcfda5e20757372fb6ec204e33916a78d864aeb5e0560b2a8aad3166a91311110cb41fce4684a5731cf0d738780f11ee7838811de' ;; \
s390x) binArch='s390x'; checksum='93ff65601c255e9a2910b8ccfd3bcd4765ea6e5261fab31918e8bef0ffa37bcfaf45e2311fd43f9d9a13751102c3644d107d463fdb64d05c2af02307b96e9772' ;; \
*) 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.4/xcaddy_0.4.4_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.4
# 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.4/xcaddy_0.4.4_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('cbc63529fd591742d67d68ca21c4cdb70a288cb91b20f2d9c711c34b4674d7beccd3aa774e5a6a4b7ea2c8fa92434911288c872b67fe56b8979eedd19130c041')) { 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.4
# 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.4/xcaddy_0.4.4_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('cbc63529fd591742d67d68ca21c4cdb70a288cb91b20f2d9c711c34b4674d7beccd3aa774e5a6a4b7ea2c8fa92434911288c872b67fe56b8979eedd19130c041')) { 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.4
# 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='09b0bd09c879c2985c562deec675da074f896c9e114717d07f11bdb2714b7e9ecbb26748431732469c245e1517cde6e78ee6b0f6e839de3992d22a3d474188fe' ;; \
armhf) binArch='armv6'; checksum='dd1ee3d27bb9f0c2b6b900e19e779398c972fc7a0affaf19ee64fb01689cdd18e2df1429251607dbdeca1ad57d1851317c9f0c0c4c4ead3aa2b9e68678a62d52' ;; \
armv7) binArch='armv7'; checksum='e13003e727c228e84b1abb72db3f92362dd232087256ea51249002d4d0a17d002760123a33dafb8d47553d54c7d821f3d3dee419347a61f967ea4617abaef46a' ;; \
aarch64) binArch='arm64'; checksum='c04464f944ebad714ded44691d359cf27109f5e088f7ee7ed5b49941c88382b0d31c91b81cb1c11444371abe7c491df06aba7306503a17627a7826ac8992e02a' ;; \
ppc64el|ppc64le) binArch='ppc64le'; checksum='c05c883e3a6162b77454ed4efa1e28278d0624a53bb096dced95e27b61f60fdcc0a40e90524806fa07e2da654c6420995fede7077c2c2319351f8f0bc1855cd9' ;; \
riscv64) binArch='riscv64'; checksum='84d1e61330aed77373ffa91dcfda5e20757372fb6ec204e33916a78d864aeb5e0560b2a8aad3166a91311110cb41fce4684a5731cf0d738780f11ee7838811de' ;; \
s390x) binArch='s390x'; checksum='93ff65601c255e9a2910b8ccfd3bcd4765ea6e5261fab31918e8bef0ffa37bcfaf45e2311fd43f9d9a13751102c3644d107d463fdb64d05c2af02307b96e9772' ;; \
*) echo >&2 "error: unsupported architecture ($apkArch)"; exit 1 ;;\
esac; \
wget -O /tmp/xcaddy.tar.gz "https://github.com/caddyserver/xcaddy/releases/download/v0.4.4/xcaddy_0.4.4_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.4
# 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.4/xcaddy_0.4.4_windows_amd64.zip" \
-OutFile "/xcaddy.zip"; \
if (!(Get-FileHash -Path /xcaddy.zip -Algorithm SHA512).Hash.ToLower().Equals('cbc63529fd591742d67d68ca21c4cdb70a288cb91b20f2d9c711c34b4674d7beccd3aa774e5a6a4b7ea2c8fa92434911288c872b67fe56b8979eedd19130c041')) { 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.4
# 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.4/xcaddy_0.4.4_windows_amd64.zip" \
-OutFile "/xcaddy.zip"; \
if (!(Get-FileHash -Path /xcaddy.zip -Algorithm SHA512).Hash.ToLower().Equals('cbc63529fd591742d67d68ca21c4cdb70a288cb91b20f2d9c711c34b4674d7beccd3aa774e5a6a4b7ea2c8fa92434911288c872b67fe56b8979eedd19130c041')) { 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 507b6b9

Please sign in to comment.