-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (27 loc) · 984 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Caddy server from source
# Inspired by
# * https://hub.docker.com/r/sapk/caddy/
# * https://hub.docker.com/r/abiosoft/caddy/
FROM golang:alpine
LABEL caddy_version="dev" architecture="amd64"
RUN apk -U --no-progress upgrade \
&& apk -U --force --no-progress add git \
&& git clone https://github.com/mholt/caddy.git /go/src/github.com/mholt/caddy \
&& cd /go/src/github.com/mholt/caddy \
&& git config --global user.email "[email protected]" \
&& git config --global user.name "caddy" \
&& git fetch origin pull/1316/head:websocket \
&& git checkout websocket \
&& git rebase origin/master \
&& cd /go \
&& go get -v ... \
&& mv /go/bin/caddy /usr/bin \
&& apk del --purge git \
&& rm -rf $GOPATH /var/cache/apk/*
WORKDIR /srv
COPY Caddyfile /etc/Caddyfile
COPY index.html /srv/index.html
EXPOSE 80 443 2015
VOLUME ["/root/.caddy"]
ENTRYPOINT ["/usr/bin/caddy"]
CMD ["--conf", "/etc/Caddyfile", "--log", "stdout"]