Table of Contents

About

This docker build file is created in order to build caddy with the:

modules.

Usage

Download the file Dockerfile to an empty directory and issue:

docker build -t TAG .

where:

After caddy is built, a container can be created and ran either via docker run or deployed within the swarm with docker stack deploy.

Note that if the image is to be deployed to a swarm, then more than likely the image should be committed to a local registry serving the local docker swarm.

Source

File: http://svn.grimore.org/docker/build/caddy/Dockerfile -

FROM caddy:builder-alpine AS builder
 
RUN xcaddy build \
    --with github.com/caddyserver/replace-response \
    --with github.com/caddy-dns/cloudflare \
    --with github.com/greenpau/caddy-security
 
FROM caddy:latest
 
COPY --from=builder /usr/bin/caddy /usr/bin/caddy