Update caddy Dockerfile (#1788)

* Change base image
This commit is contained in:
ahkui 2018-09-15 21:22:44 +08:00 committed by Shao Yu-Lung (Allen)
parent 86a4108ef4
commit 0bbfb2d228
1 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,15 @@
FROM zuohuadong/caddy:alpine FROM golang:alpine
LABEL maintainer="Huadong Zuo <admin@zuohuadong.cn>" LABEL maintainer="Huadong Zuo <admin@zuohuadong.cn>"
RUN apk add --no-cache \
openssh \
git \
build-base && \
go get github.com/abiosoft/caddyplug/caddyplug \
&& caddyplug install-caddy \
apk del build-base
ARG plugins="cors" ARG plugins="cors"
## ARG plugins="cors cgi cloudflare azure linode" ## ARG plugins="cors cgi cloudflare azure linode"
@ -12,7 +20,7 @@ RUN apk add --no-cache inotify-tools \
&& echo -e "#!/bin/sh\nwhile inotifywait -e modify /etc/caddy; do\n\tpkill caddy\ndone " >> /start.sh \ && echo -e "#!/bin/sh\nwhile inotifywait -e modify /etc/caddy; do\n\tpkill caddy\ndone " >> /start.sh \
&& chmod +x /start.sh && chmod +x /start.sh
EXPOSE 80 443 2015 EXPOSE 80 443
WORKDIR /var/www/public WORKDIR /var/www/public