Created
April 30, 2020 06:29
-
-
Save malys/626569c6443dc2151d334807d8b9e8f0 to your computer and use it in GitHub Desktop.
[Openxpki] #keystore #pki #windows #docker #docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
# https://www.mail-archive.com/openxpki-users@lists.sourceforge.net/msg01492.html | |
# See https://github.com/openxpki/openxpki-docker.git | |
services: | |
db: | |
# restart: always | |
image: mariadb:10 | |
command: --default-authentication-plugin=mysql_native_password | |
volumes: | |
- openxpkidb:/var/lib/mysql | |
- ./openxpki-config/contrib/sql/schema-mysql.sql:/docker-entrypoint-initdb.d/schema-mysql.sql | |
environment: | |
MYSQL_DATABASE: openxpki | |
MYSQL_USER: openxpki | |
MYSQL_PASSWORD: openxpki | |
MYSQL_ROOT_PASSWORD: topsecret | |
openxpki-server: | |
# restart: always | |
# image: whiterabbitsecurity/openxpki3 | |
build: | |
context: ./ | |
dockerfile: Dockerfile-server | |
command: /usr/bin/openxpkictl start --no-detach | |
depends_on: | |
- db | |
volumes: | |
- openxpkilog:/var/log/openxpki | |
- openxpkisocket:/var/openxpki/ | |
# Open https://localhost:8443/openxpki/ | |
openxpki-client: | |
# restart: always | |
build: | |
context: ./ | |
dockerfile: Dockerfile-server | |
command: /usr/bin/start-apache | |
ports: | |
- "8080:80/tcp" | |
- "8443:443/tcp" | |
depends_on: | |
- openxpki-server | |
volumes: | |
- openxpkilog:/var/log/openxpki | |
- openxpkisocket:/var/openxpki/ | |
volumes: | |
openxpkidb: | |
openxpkisocket: | |
openxpkilog: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG OPENXPKI_NOCONFIG=1 | |
RUN apt-get update && \ | |
apt-get install --assume-yes gpg libdbd-mysql-perl libapache2-mod-fcgid apache2 wget locales less gettext | |
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales | |
RUN wget https://packages.openxpki.org/v3/debian/openxpki.list -O /etc/apt/sources.list.d/openxpki.list | |
RUN wget https://packages.openxpki.org/v3/debian/Release.key -O - | apt-key add - | |
RUN apt-get update && apt-get install --assume-yes unzip libopenxpki-perl openxpki-i18n openxpki-cgi-session-driver libcrypt-libscep-perl libscep | |
RUN apt-get clean | |
######### Download and install demo configuration files | |
RUN wget https://github.com/openxpki/openxpki-config/archive/docker.zip -O /etc/openxpki-config-docker.zip | |
RUN rm -rf /etc/openxpki && \ | |
unzip -b -o /etc/openxpki-config-docker.zip -d /etc/ && \ | |
mv /etc/openxpki-config-docker /etc/openxpki && \ | |
ls /etc/openxpki && \ | |
rm -rf /etc/openxpki-config-docker.zip | |
######### | |
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 | |
VOLUME /var/log/openxpki /etc/openxpki | |
WORKDIR /var/log/openxpki/ | |
RUN ln -s /etc/openxpki/contrib/apache2-openxpki.conf /etc/apache2/conf-enabled/ | |
RUN a2dissite 000-default; a2disconf serve-cgi-bin | |
RUN ln -s /etc/openxpki/contrib/apache2-openxpki-site.conf /etc/apache2/sites-enabled/ | |
RUN a2enmod cgid fcgid headers rewrite ssl | |
COPY bin/setup-cert.sh /usr/bin/setup-cert | |
RUN chmod +x /usr/bin/setup-cert | |
COPY bin/start-apache.sh /usr/bin/start-apache | |
RUN chmod +x /usr/bin/start-apache | |
COPY bin/update-i18n.sh /usr/bin/update-i18n | |
RUN chmod +x /usr/bin/update-i18n | |
CMD ["/usr/bin/openxpkictl","start","--no-detach"] | |
EXPOSE 80 443 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment