forked from cvast/cvast-letsencrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (30 loc) · 1.15 KB
/
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
34
35
36
37
38
FROM python:2.7-slim-buster
USER root
RUN apt-get update -y &&\
apt-get upgrade -y &&\
apt-get update -y &&\
apt-get install -y build-essential &&\
apt-get install -y libffi-dev &&\
apt-get install -y libssl-dev &&\
apt-get install -y git &&\
apt-get install -y curl &&\
apt-get install -y dos2unix &&\
apt-get install -y certbot
ENV INSTALL_DIR_LOCAL=./install
ENV INSTALL_DIR=/install
ENV APP_DIR=/letsencrypt
# rsa or ecdsa, optional, defaults to rsa (string)
ENV KEY_TYPE=rsa
ENV HTTPS_PORT=443
WORKDIR ${INSTALL_DIR}
RUN curl -O https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
COPY ${INSTALL_DIR_LOCAL}/letsencrypt_aws_requirements.txt ${INSTALL_DIR}/letsencrypt_aws_requirements.txt
RUN pip install -r ${INSTALL_DIR}/letsencrypt_aws_requirements.txt
COPY ${INSTALL_DIR_LOCAL}/letsencrypt_entrypoint.sh ${INSTALL_DIR}/letsencrypt_entrypoint.sh
COPY ${INSTALL_DIR_LOCAL}/letsencrypt-aws.py ${INSTALL_DIR}/letsencrypt-aws.py
RUN dos2unix ${INSTALL_DIR}/letsencrypt_entrypoint.sh
RUN chmod +x ${INSTALL_DIR}/letsencrypt-aws.py
RUN chmod +x ${INSTALL_DIR}/letsencrypt_entrypoint.sh
WORKDIR ${INSTALL_DIR}
ENTRYPOINT ["./letsencrypt_entrypoint.sh"]