feat: build custom caddy with gopkg module

This commit is contained in:
Peter 2022-12-30 19:56:15 +01:00
parent df70dffebe
commit ec4d28e5d6
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
4 changed files with 9 additions and 8 deletions

View file

@ -26,5 +26,4 @@ jobs:
- task: caddy
file: ci-images.git/.concourse/tasks/caddy.yml
input_mapping:
repo: ci-images.git
caddy: caddy-release
repo: ci-images.git

View file

@ -10,8 +10,6 @@ image_resource:
inputs:
- name: repo
path: .
- name: caddy
path: caddy/caddy-release
params:
GITEA_USER: ((gitea-credentials.user))

1
caddy/.gitignore vendored
View file

@ -1 +0,0 @@
caddy-release/

View file

@ -1,9 +1,14 @@
FROM gcr.io/distroless/static
FROM docker.io/caddy:builder-alpine AS builder
ADD caddy-release/caddy_*_linux_amd64.tar.gz /usr/local/caddy
RUN xcaddy build \
--with magnax.ca/caddy/gopkg
FROM gcr.io/distroless/static AS final
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
COPY config/caddy.json /etc/caddy/caddy.json
EXPOSE 3000
ENTRYPOINT [ "/usr/local/caddy/caddy" ]
ENTRYPOINT [ "/usr/bin/caddy" ]
CMD [ "run", "--config=/etc/caddy/caddy.json" ]