forked from rbaumgar/rhel-caddy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (22 loc) · 876 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
32
33
FROM registry.access.redhat.com/rhel7:latest
LABEL maintainer "Robert Baumgartner <[email protected]>"
LABEL caddy_version="0.10.4" architecture="amd64"
ENV CADDY_FILE=none
ARG plugins=http.git
# RUN apk add --no-cache openssh-client git tar curl
COPY Caddyfile /etc/Caddyfile
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# RUN /entrypoint.sh
RUN curl --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://caddyserver.com/download/linux/amd64?plugins=${plugins}&license=personal" \
| tar --no-same-owner -C /usr/bin/ -xz caddy \
&& chmod 0755 /usr/bin/caddy \
&& chmod 0777 /srv \
&& /usr/bin/caddy -version
EXPOSE 2015
VOLUME /root/.caddy
WORKDIR /srv
ENTRYPOINT ["/usr/bin/caddy"]
CMD ["--conf", "/etc/Caddyfile", "--log", "stdout"]