I’ve built a simple Docker image to build plugins with Caddy. You can find the code on GitHub. I thought it would be worth sharing, might be useful for someone. Here is a bit of the copy of the README:
- Plugin must be a module.
- The working directory must be the plugin root.
- The plugin must not have a folder named
Here’s an example for Circle CI, where it first lints using golangci-lint
and then builds the plugin with Caddy:
version: 2 jobs: lint: docker: - image: golangci/golangci-lint:v1.16 steps: - checkout - run: golangci-lint run -v build: docker: - image: hacdias/caddy-plugin-test:latest steps: - checkout - run: caddy-build workflows: version: 2 build-workflow: jobs: - lint - build
Hope it’s useful!