Docker image to build plugins with Caddy

Hey all!

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:

Requirements

  1. Plugin must be a module.
  2. The working directory must be the plugin root.
  3. The plugin must not have a folder named caddy.

Usage

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!

3 Likes

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