Open casperdcl opened 4 weeks ago
I think that we can try adding this to the base image 🤔
apart from chmod a+x /usr/bin/forego
, this won't really affect the base image... the CADDY_UID
, CADDY_GID
must be overridden by the user.
Alternatively, I suppose the "correct" way is to have:
ENV
not ARG
for CADDY_UID
& CADDY_GID
chown -R ${CADDY_UID:-0}:${CADDY_GID:-0}
caddy
with ${CADDY_UID:-0}:${CADDY_GID:-0}
su caddy -c $@
potentially worth documenting how to run as non-root users (related: https://github.com/caddyserver/caddy-docker/issues/104)?
I had to do:
which allows building using e.g.
--arg CADDY_GID=$(getent group docker | cut -d: -f3) --arg CADDY_UID=$(id -u)