-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to docker multiplatform images and update packages #219
Conversation
adfd396
to
92e5f03
Compare
Maybe you could consider switching to the It ships with xcaddy so you can use that instead, to build the images. |
d38b20a
to
d8a4ff1
Compare
I was not aware about FROM golang
RUN set -eux \
; \
mkdir -p \
/config/caddy \
/data/caddy \
/etc/caddy \
/etc/gatekeeper/auth/local \
/usr/share/caddy \
; \
GO111MODULE=on go get -u github.com/caddyserver/xcaddy/cmd/xcaddy \
; \
xcaddy build --with github.com/greenpau/caddy-auth-portal \
--with github.com/greenpau/caddy-auth-jwt \
--with github.com/lucaslorentz/caddy-docker-proxy/plugin/v2 \
--output /usr/bin/caddy
# set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/docker-library/golang/blob/1eb096131592bcbc90aa3b97471811c798a93573/1.14/alpine3.12/Dockerfile#L9
RUN [ -e /etc/nsswitch.conf ] || echo 'hosts: files dns' > /etc/nsswitch.conf
# https://caddyserver.com/docs/conventions#file-locations
ENV XDG_CONFIG_HOME /config
ENV XDG_DATA_HOME /data
VOLUME /config
VOLUME /data
VOLUME /etc/caddy
VOLUME /etc/gatekeeper/auth
# Let's Encrypt TLS challenge
EXPOSE 80
# Official static web site
EXPOSE 443
# /metrics endpoint for Prometheus
EXPOSE 2019
WORKDIR /srv
ENV TZ "UTC0"
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] |
CDP is executed using a different CLI command. Your last line should be something like:
|
Thank you very much @lucaslorentz |
2cea9e6
to
fd805f4
Compare
60de702
to
01aa26f
Compare
d1ca28e
to
47d7287
Compare
@francislavoie Tried to use caddy builder image, but it would increase too much the build time because each platform would need to download all golang modules. |
47d7287
to
637ceac
Compare
Fix #218