abiosoft / caddy-docker

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

Build args for plugins do not work (still happens with new plugin format) #76

Closed kidhasmoxy closed 6 years ago

kidhasmoxy commented 6 years ago

The instructions for building a custom image with a user specified plugin list no longer work with the recent updates to the builder. I've also tried using the instructions in the readme for a one time build separate from my compose file, and those did not change the plugins installed.

This section in a compose file used to work perfectly for building a new image with my desired plugins:

---
version: '2'
services:
  caddy:
    build:
      context: https://github.com/abiosoft/caddy-docker.git
      args:
        - plugins=http.authz,http.cache,http.cgi,http.cors,http.expires,http.filter,http.forwardproxy,http.git,http.grpc,http.ipfilter,http.jwt,http.locale,http.login,http.minify,http.nobots,http.proxyprotocol,http.ratelimit,http.realip,http.upload,tls.dns.googlecloud

Now the image builds, but the verification step lists only standard plugins, and doesn't include any of the extras requested.

Step 11/18 : RUN /usr/bin/caddy -plugins ---> Running in dfb8e94a94ce Server types: http

Caddyfile loaders: short flag default

Other plugins: http.basicauth http.bind http.browse http.errors http.expvar http.ext http.fastcgi http.gzip http.header http.index http.internal http.limits http.log http.markdown http.mime http.pprof http.proxy http.push http.redir http.request_id http.rewrite http.root http.status http.templates http.timeouts http.websocket on shutdown startup tls tls.storage.file

abiosoft commented 6 years ago

Sorry, since Caddy 0.10.10, the format has been changed to omit the plugin type. Simply use git, realip e.t.c.

Kindly reopen if it still fails.