-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (15 loc) · 706 Bytes
/
Dockerfile
File metadata and controls
27 lines (15 loc) · 706 Bytes
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
FROM nginx:alpine
LABEL maintainer="Matthieu Bargheon <bh@bhtech.io>"
LABEL git="https://github.com/bh42/docker-nginx-reverseproxy-letsencrypt"
LABEL version="0.1"
VOLUME ["/certs", "/conf"]
RUN apk add netcat-openbsd bc curl wget git bash openssl libressl
RUN cd /tmp/ && git clone https://github.com/acmesh-official/acme.sh.git
RUN cd /tmp/acme.sh/ && ./acme.sh --install && rm -rf /tmp/acme.sh
WORKDIR /root/.acme.sh/
RUN mkdir -vp /var/www/html/.well-known/acme-challenge/
COPY entrypoint.sh /root/.acme.sh/
COPY service.conf.template /tmp
RUN chmod +x /root/.acme.sh/entrypoint.sh
RUN rm -rf /etc/nginx/conf.d && ln -s /conf /etc/nginx/conf.d
ENTRYPOINT [ "/root/.acme.sh/entrypoint.sh" ]