diff --git a/.github/workflows/docker-caddy.yml b/.github/workflows/docker-caddy.yml new file mode 100644 index 0000000..fbba805 --- /dev/null +++ b/.github/workflows/docker-caddy.yml @@ -0,0 +1,31 @@ +name: docker-caddy + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + tags: nite07/caddy:latest + platforms: linux/amd64 + context: ./caddy diff --git a/caddy/Dockerfile b/caddy/Dockerfile new file mode 100644 index 0000000..ce5377d --- /dev/null +++ b/caddy/Dockerfile @@ -0,0 +1,19 @@ +FROM caddy:builder AS builder + +RUN xcaddy build \ + --with github.com/caddyserver/nginx-adapter \ + --with github.com/caddy-dns/cloudflare \ + --with github.com/caddyserver/replace-response \ + --with github.com/mholt/caddy-webdav \ + --with github.com/mholt/caddy-ratelimit \ + --with github.com/WeidiDeng/caddy-cloudflare-ip \ + --with github.com/porech/caddy-maxmind-geolocation \ + --with github.com/mholt/caddy-l4/layer4 + +FROM caddy:latest + +COPY --from=builder /usr/bin/caddy /usr/bin/caddy + + + +