# Copyright (C) 2019 OX Software GmbH # # This file is part of OX Automation. # # OX Automation is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # OX Automation is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with OX Automation. If not, see <http://www.gnu.org/licenses/>. # # # Authors: # Benedikt Kroening <benedikt.kroening@open-xchange.com> # # This docker-container will contain everything required for an OX groupware node # Database and mailserver need to be deployed seperately # An ARG declared before the FROM instruction can’t be used after the FROM. ARG DISTRIBUTION=debian ARG RELEASE=buster FROM ${DISTRIBUTION}:${RELEASE} # these are the defaults for a full ox groupware image ARG ARG_INSTALL_FRONTEND=true ARG ARG_INSTALL_MIDDLEWARE=true ARG ARG_INSTALL_GUARD=false ARG ARG_INSTALL_DOCUMENTS=false ARG ARG_INSTALL_DOCUMENTCONVERTER=false ARG ARG_INSTALL_TYPE=docker-singlenode ARG OX_INIT=false ENV DATABASE_HOST_NAME=database ENV OX_MAIL_HOST=dovecot.qa.open-xchange.com ENV OX_MAIL_DOMAIN=qa.open-xchange.com ENV DATABASE_ROOT_USER=root ENV DATABASE_ROOT_PASS=secret ENV DATABASE_HOST_NAME=database ENV DATABASE_HOST_PORT=3306 ENV OX_ADMINMASTER_USER=oxadminmaster ENV OX_ADMINMASTER_PASS=secret ENV OX_MAIL_HOST=dovecot.qa.open-xchange.com ENV OX_MAIL_DOMAIN=qa.open-xchange.com ENV OX_SERVER_NAME=docker ENV OX_CLUSTER_NAME=docker ENV OX_HAZELCAST_ENABLED=false ENV OX_CONFIGDB_USER=openexchange ENV OX_CONFIGDB_PASS=secret ENV OX_CONFIGDB_NAME=configdb ENV OX_ENV_QA=true ENV INSTALL_FRONTEND=${ARG_INSTALL_FRONTEND} ENV INSTALL_MIDDLEWARE=${ARG_INSTALL_MIDDLEWARE} ENV INSTALL_GUARD=${ARG_INSTALL_GUARD} ENV INSTALL_DOCUMENTS=${ARG_INSTALL_DOCUMENTS} ENV INSTALL_DOCUMENTCONVERTER=${ARG_INSTALL_DOCUMENTCONVERTER} ENV INSTALL_TYPE=${ARG_INSTALL_TYPE} ADD . /ox-installer # This variable needs to be set outside of the installer script to avoid some random overwrites from wrong config files ENV CONFIG_DIR="/ox-installer/docker/singlenode/config" RUN /ox-installer/ox-installer.sh RUN chsh -s /bin/bash open-xchange && \ echo PATH=$PATH:/opt/open-xchange/sbin/ >> ~/.bashrc && \ mkdir /var/run/apache2 && \ cp -a -u /opt/open-xchange/etc/. /opt/open-xchange/etc.dist && \ cp -R /ox-installer/docker/_rootfs/etc/* /etc/ EXPOSE 8009 EXPOSE 80 EXPOSE 443 VOLUME [ "/var/opt/filestore" ] ENTRYPOINT [ "/ox-installer/docker/entrypoint.sh" ] CMD [ "supervisord" ]