[docker] caddy building with plugin with docker-compose

hi, I’m trying to use caddy docker with vultr, here’s my compose file:

version: '2'
             context: github.com/abiosoft/caddy-docker.git
                 plugins: git,filemanager,vultr
         restart: unless-stopped
             - 80:80
             - 443:443
             - ./Caddyfile:/etc/Caddyfile
             - ./examplecom:/site/examplecom
             - ./.caddy:/root/.caddy
             - VULTR_API_KEY=thisisapikey

after running docker-compose up, it builds the image succesfully and runs it, but i’m getting:

caddy_1      | 2018/03/30 23:39:25 /etc/Caddyfile:5 - Error during parsing: Unsupported DNS provider 'vultr'
caddy_1      | exit status 1

the line 5 on caddyfile regards to:

tls {
    dns vultr

so what am i doing wrong?

so i’ve tried changing the args to look like this:

- plugins=git,filemanager,vultr

with the same result.

and i noticed when i run docker-compose build caddy that the plugins args is not loading at all:

Step 3/22 : ARG plugins="git"

any idea why?

ok solved this, just so future people see this, running the docker build script on your cheap VPS won’t work as the go binary needs a lot of RAM to run.

running the docker build script on my macbookpro and pushing it to dockerhub, then pulling it on the VPS works fine. now my caddy have vultr for wildcard lets encrypt.

1 Like

That’s interesting! I’ve built Caddy binaries on my 1GB Vultr VPS’ before. I don’t recall if I tried to build them with DNS plugins.

I was going to ask if it should have been tls.dns.vultr rather than vultr, since I usually build with tls.dns.cloudflare, but if it’s working on your MBP, I guess we’re all good.

1 Like

i think it might be because i’m running it on the 512mb server :stuck_out_tongue:

The syntax has changed for a while now if you’re using the docker image. If that still works for you, you’re probably on a version before 0.10. tls.dns.cloudflare should now be cloudfare.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.