First support for caddy 2
This commit is contained in:
parent
bc814e85ef
commit
3486be607c
21
.drone.yml
Normal file
21
.drone.yml
Normal file
@ -0,0 +1,21 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: Publish to docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
auto_tag: true
|
||||
repo: hibas123.azurecr.io/caddy
|
||||
registry: hibas123.azurecr.io
|
||||
debug: true
|
||||
when:
|
||||
branch: [master]
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
43
Dockerfile
43
Dockerfile
@ -1,29 +1,34 @@
|
||||
FROM alpine:3.10
|
||||
FROM caddy:builder AS builder
|
||||
|
||||
RUN caddy-builder \
|
||||
github.com/caddy-dns/cloudflare
|
||||
|
||||
FROM caddy:2.0.0
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
LABEL maintainer "Fabian Stamm <dev@fabianstamm.de>"
|
||||
|
||||
ENV ACME_AGREE="true"
|
||||
ENV EMAIL=""
|
||||
# RUN apk add --no-cache \
|
||||
# ca-certificates \
|
||||
# git \
|
||||
# mailcap \
|
||||
# openssh-client \
|
||||
# tzdata \
|
||||
# bash \
|
||||
# curl
|
||||
|
||||
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates \
|
||||
git \
|
||||
mailcap \
|
||||
openssh-client \
|
||||
tzdata \
|
||||
bash \
|
||||
curl
|
||||
|
||||
RUN curl https://getcaddy.com | bash -s personal http.cors,http.ratelimit,tls.dns.cloudflare
|
||||
|
||||
#Validate install
|
||||
RUN caddy -version
|
||||
RUN caddy -plugins
|
||||
RUN caddy version
|
||||
RUN caddy list-modules
|
||||
|
||||
EXPOSE 80 443
|
||||
EXPOSE 80 443 2019
|
||||
|
||||
VOLUME [ "/data", "/config" ]
|
||||
|
||||
VOLUME [ "/root/.caddy", "/src" ]
|
||||
WORKDIR /srv
|
||||
|
||||
CMD ["caddy", "--conf", "/etc/Caddyfile", "--log", "stdout", "--agree=$ACME_AGREE", "--email=$EMAIL"]
|
||||
COPY Caddyfile /etc/Caddyfile
|
||||
|
||||
CMD ["caddy", "run", "--config", "/etc/Caddyfile", "--adapter", "caddyfile"]
|
Loading…
Reference in New Issue
Block a user