Public Repository

Last pushed: 2 years ago
Short Description
Dockerfile
Full Description

FROM ubuntu:trusty
MAINTAINER Casper Yeh casper.yeh@gmail.com

Install base packages

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
curl \
unzip \
apache2 \
libapache2-mod-php5 \
php5-common \
php5-mysql \
php5-gd \
php5-curl \
php5-cli \
php5-mcrypt \

php5-memcache \

    php5-intl \
    php5-imap \

php5-xmlrpc \

php5-json \

php-pear \

php-apc \

    openssh-server \
    nano && \
rm -rf /var/lib/apt/lists/* && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
sed -i "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini

VOLUME [/etc/apache2]
VOLUME [/etc/php5]
VOLUME [/var/www]

Add image configuration and scripts

ADD run.sh /run.sh
RUN chmod 755 /*.sh

Configure /app folder with sample app

#RUN mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html

#ADD sample/ /app

EXPOSE 80
EXPOSE 22
WORKDIR /tmp
CMD ["/run.sh"]

run.sh

#!/bin/bash
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/sbrndev
chmod -R 775 /var/www/sbrndev
chmod -R 777 /var/www/sbrndev/app/configs
chmod -R 777 /var/www/sbrndev/images
chmod -R 777 /var/www/sbrndev/var/tmp
chmod -R 777 /var/www/sbrndev/var/cache
source /etc/apache2/envvars
tail -F /var/log/apache2/* &
exec apache2 -D FOREGROUND

Docker Pull Command
Owner
yeshijian

Comments (0)