Farid Ahmadian / DevOps

Dockerfile


Jorani Dockerfile


FROM ubuntu:16.04
RUN apt-get update -y
RUN apt-get install -y unzip apache2 php7.0 libapache2-mod-php7.0 php7.0-ldap apache2-utils php7.0-mbstring
RUN apt-get install -y wget
RUN apt-get install -y php7.0-mysql
RUN apt-get install -y php7.0-zip
RUN apt-get install -y php7.0-xml
RUN phpenmod mcrypt
RUN phpenmod openssl
RUN wget https://github.com/bbalet/jorani/archive/v0.6.4.tar.gz
RUN rm -Rf /var/www/html
RUN tar zxvf v0.6.4.tar.gz
RUN mv /jorani-0.6.4 /var/www/html/
RUN a2enmod rewrite
COPY 000-default.conf /etc/apache2/sites-enabled/000-default.conf
COPY database.php /var/www/html/application/config/database.php
COPY email.php /var/www/html/application/config/email.php
COPY config.php /var/www/html/application/config/config.php
COPY data/jorani/patches/Leaves_model.php /var/www/html/application/models/Leaves_model.php
#COPY ldap.conf /etc/ldap/ldap.conf
# Configure Apache2
ENV APACHE_RUN_USER     www-data
ENV APACHE_RUN_GROUP    www-data
ENV APACHE_LOG_DIR      /var/log/apache2
env APACHE_PID_FILE     /var/run/apache2.pid
env APACHE_RUN_DIR      /var/run/apache2
env APACHE_LOCK_DIR     /var/lock/apache2
env APACHE_LOG_DIR      /var/log/apache2
EXPOSE 80
ENTRYPOINT [ "/usr/sbin/apache2", "-DFOREGROUND" ]

Jenkins Dockerfile


#docker build  --rm=true -t pathseeker/jenkins:master .
FROM jenkins/jenkins:2.150.3

#copy this folder from ts-internal/Software/Jenkins/master to your local folder
COPY cert /tmp/cert

USER root
RUN mkdir -p /etc/ssl/certs/java

# Import certificates for other services
RUN keytool -import -alias octahedron.pathseeker.com -file /tmp/cert/octahedron.pathseeker.com.crt -keystore /etc/ssl/certs/java/cacerts -storepass 'changeit' -noprompt
RUN keytool -import -alias octahedron.pathseeker.com.ldap -file /tmp/cert/octahedron.pathseeker.com.ldap.cert -keystore /etc/ssl/certs/java/cacerts -storepass 'changeit' -noprompt

#Set correct TimeZone
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

USER jenkins
ENV JENKINS_OPTS  --httpPort=-1 --httpsPort=8080 --httpsKeyStore=/tmp/cert/jenkins_keystore.jks --httpsKeyStorePassword=changeit
EXPOSE 8080

BY: Farid Ahmadian
TAG: PHP, Dockerfile, docker
DATE: 2018-07-21 10:36:53


Farid Ahmadian / DevOps [ TXT ]

With many thanks and best wishes for dear Pejman Moghadam, someone who taught me alot in linux and life :)