-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (30 loc) · 1.65 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
# SPDX-FileCopyrightText: 2024 Joe Pitt
#
# SPDX-License-Identifier: GPL-3.0-only
FROM python:3.12-slim
ENV ALLOWED_IPS=0.0.0.0/0,::/0 BLOCKED_IPS=0.0.0.0/32 CA_NAME=ManagementCA \
CERT_PROFILE=SERVER EJBCA_API_VERIFY=false \
EJBCA_API=https://ejbca:8443/ejbca/ejbcaws/ejbcaws?wsdl ENTITY_PROFILE=EMPTY \
MYSQL_DATABASE=serles MYSQL_HOST=mysql MYSQL_PASSWORD=changeme MYSQL_PORT=3306 \
MYSQL_USERNAME=serles USE_MYSQL=false VERIFY_PTR=false
EXPOSE 8000
LABEL org.opencontainers.image.authors="Joe Pitt <Joe.Pitt@joepitt.co.uk>" \
org.opencontainers.image.base.name="hub.docker.com/_/python:3.12" \
org.opencontainers.image.description="Docker wrapper of serles-acme ACME server for EJBCA." \
org.opencontainers.image.licenses="GPL-3.0-only" \
org.opencontainers.image.ref.name="serles-acme" \
org.opencontainers.image.source="https://github.com/joepitt91/serles-acme-docker" \
org.opencontainers.image.title="serles-acme" \
org.opencontainers.image.version="1.1.0" \
org.opencontainers.image.url="https://github.com/joepitt91/serles-acme-docker"
VOLUME [ "/etc/serles" ]
COPY configure.py /usr/local/sbin/configure.py
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY healthcheck.py /usr/local/bin/healthcheck.py
COPY gunicorn_config.py /opt/serles/gunicorn_config.py
ENTRYPOINT [ "sh", "/usr/local/bin/entrypoint.sh" ]
HEALTHCHECK --timeout=3s CMD [ "/opt/serles/bin/python3", "/usr/local/bin/healthcheck.py" ]
RUN python3 -m venv /opt/serles &&\
. /opt/serles/bin/activate &&\
python3 -m pip install --quiet --no-cache-dir --upgrade pip setuptools &&\
python3 -m pip install --quiet --no-cache-dir pymysql serles-acme==1.1.0