abiosoft / caddy-docker

Docker container for Caddy
https://hub.docker.com/r/abiosoft/caddy/
MIT License
768 stars 315 forks source link

Custom plugin not working #119

Closed rochdev closed 6 years ago

rochdev commented 6 years ago

I tried adding plugins using build args with the following Dockerfile:

ARG plugins="dns,gandiv5"
FROM abiosoft/caddy

But I get the following error when I start a container:

2018/05/31 18:42:27 /etc/Caddyfile:4 - Error during parsing: Unsupported DNS provider 'gandiv5'
exit status 1
abiosoft commented 6 years ago

How did you build and run the container ?

rochdev commented 6 years ago

@abiosoft I've used the build functionality of Docker Hub directly: https://hub.docker.com/r/rochdev/caddy-gandiv5/builds/bwtxtum7fpvvxqdj2unicza/

To run it:

sudo docker create \
    --name=caddy \
    --restart always \
    -e GANDIV5_API_KEY=<my_api_key> \
    -v /etc/localtime:/etc/localtime:ro \
    -v /volume4/docker/caddy/etc/Caddyfile:/etc/Caddyfile \
    -v /volume4/docker/caddy/root/.caddy:/root/.caddy \
    -p 80:80 -p 443:443 \
    rochdev/caddy-gandiv5

sudo docker start caddy
rochdev commented 6 years ago

I was using the base image which is already built instead of the source repo, which is why it wasn't working.