Skip to content

Commit 5b07fbb

Browse files
Lednerbbestlong
authored andcommitted
Switched base image to fix recurrent caddy issues. (laradock#2095)
1 parent 83a24ef commit 5b07fbb

1 file changed

Lines changed: 3 additions & 28 deletions

File tree

caddy/Dockerfile

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
1-
FROM golang:alpine
1+
FROM abiosoft/caddy:no-stats
22

3-
LABEL maintainer="Huadong Zuo <admin@zuohuadong.cn>"
3+
CMD ["--conf", "/etc/caddy/Caddyfile", "--log", "stdout", "--agree=true"]
44

5-
RUN apk add --no-cache \
6-
openssh \
7-
git \
8-
build-base \
9-
&& mkdir -p $GOPATH/src/golang.org/x/ \
10-
&& cd $GOPATH/src/golang.org/x/ \
11-
&& git clone https://github.com/golang/sys.git sys \
12-
&& go get github.com/abiosoft/caddyplug/caddyplug \
13-
&& caddyplug install-caddy \
14-
apk del build-base
15-
16-
ARG plugins="cors"
17-
18-
## ARG plugins="cors cgi cloudflare azure linode"
19-
20-
RUN caddyplug install ${plugins}
21-
22-
RUN apk add --no-cache inotify-tools \
23-
&& echo -e "#!/bin/sh\nwhile inotifywait -e modify /etc/caddy; do\n\tpkill caddy\ndone " >> /start.sh \
24-
&& chmod +x /start.sh
25-
26-
EXPOSE 80 443
27-
28-
WORKDIR /var/www/public
29-
30-
CMD ["sh","-c","/start.sh & /usr/bin/caddy -conf /etc/caddy/Caddyfile -agree"]
5+
EXPOSE 80 443 2015

0 commit comments

Comments
 (0)