add: caddy
This commit is contained in:
parent
0c51061149
commit
a17c48848d
31
.github/workflows/docker-caddy.yml
vendored
Normal file
31
.github/workflows/docker-caddy.yml
vendored
Normal file
@ -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
|
19
caddy/Dockerfile
Normal file
19
caddy/Dockerfile
Normal file
@ -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
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user