Skip to content
Snippets Groups Projects
Select Git revision
  • b9aa44f1ce40e724c3209a97d13fb5e03e586dcf
  • master default
  • rename_category_group
  • php8.1_deprecations
  • v1.12.1
  • v1.13
  • v1.12
  • v1.11
  • v1.10
  • v1.9
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
19 results

Dockerfile

Blame
  • user avatar
    Carsten Karbach authored
    b9aa44f1
    History
    Dockerfile 1.78 KiB
    FROM ubuntu:16.04
    MAINTAINER Carsten Karbach (c.karbach@fz-juelich.de)
    
    # install dependencies, certificates, apache
    RUN apt-get update \
            && apt-get install -y --no-install-recommends ca-certificates \
            && apt-get -y dist-upgrade \
            && apt-get autoremove -y \
            && apt-get clean all \
            && apt-get install -y apache2 \
            && rm -r /var/lib/apt/lists/*
    
    # Set environment variables. 
    ENV HOME /root 
    # Define working directory. 
    WORKDIR /root
    
    # disable interactive functions 
    ENV DEBIAN_FRONTEND noninteractive 
    # Install php
    RUN apt-get update && \
     apt-get install -y curl zip unzip php libapache2-mod-php git \
      php-fpm php-cli php-mysqlnd php-pgsql php-sqlite3 php-redis \
      php-apcu php-intl php-imagick php-mcrypt php-json php-gd php-curl php-mbstring php-xml && \
     phpenmod mcrypt && \
     rm -rf /var/lib/apt/lists/*
    
    # Install composer
    RUN cd /tmp && curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
    
    # Setup for EventsAPI application
    RUN rm /var/www/html/index.html
    # Add EventsApi source
    ADD . /var/www/html/EventsAPI
    # Activate Rewrite and SSL module
    RUN a2enmod rewrite && a2enmod ssl
    # Configure Rewrites for silex
    RUN cp /var/www/html/EventsAPI/configs/000-default.conf /etc/apache2/sites-available/000-default.conf && \
      cp /var/www/html/EventsAPI/configs/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf
    # Activate SSL connections
    RUN a2ensite default-ssl.conf
    # Set access rights for www-data, run composer
    RUN php /var/www/html/EventsAPI/utils/install.php
    
    # DO not allow access to root doc
    RUN echo "deny from all" > /var/www/html/.htaccess
    
    ADD ./servercerts /etc/ssl/certs/
    ADD setup.sh /tmp/
    WORKDIR /tmp
    RUN ./setup.sh
    RUN rm -rf /tmp/*
    
    # Default command       
    CMD ["apachectl", "-D", "FOREGROUND"]