forked from laradock/laradock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched base image to fix recurrent caddy issues. (laradock#2095)
- Loading branch information
Showing
1 changed file
with
3 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,5 @@ | ||
FROM golang:alpine | ||
FROM abiosoft/caddy:no-stats | ||
|
||
LABEL maintainer="Huadong Zuo <[email protected]>" | ||
CMD ["--conf", "/etc/caddy/Caddyfile", "--log", "stdout", "--agree=true"] | ||
|
||
RUN apk add --no-cache \ | ||
openssh \ | ||
git \ | ||
build-base \ | ||
&& mkdir -p $GOPATH/src/golang.org/x/ \ | ||
&& cd $GOPATH/src/golang.org/x/ \ | ||
&& git clone https://github.com/golang/sys.git sys \ | ||
&& go get github.com/abiosoft/caddyplug/caddyplug \ | ||
&& caddyplug install-caddy \ | ||
apk del build-base | ||
|
||
ARG plugins="cors" | ||
|
||
## ARG plugins="cors cgi cloudflare azure linode" | ||
|
||
RUN caddyplug install ${plugins} | ||
|
||
RUN apk add --no-cache inotify-tools \ | ||
&& echo -e "#!/bin/sh\nwhile inotifywait -e modify /etc/caddy; do\n\tpkill caddy\ndone " >> /start.sh \ | ||
&& chmod +x /start.sh | ||
|
||
EXPOSE 80 443 | ||
|
||
WORKDIR /var/www/public | ||
|
||
CMD ["sh","-c","/start.sh & /usr/bin/caddy -conf /etc/caddy/Caddyfile -agree"] | ||
EXPOSE 80 443 2015 |