lamps/Dockerfile
2017-05-27 23:17:15 +10:00

58 lines
1.9 KiB
Docker

# NAME leenooks/lamps
# VERSION php56
FROM registry.leenooks.net/leenooks/base:7
RUN yum -y install epel-release && yum clean all
RUN yum -y install tsmpipe && yum clean all
RUN yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && yum clean all && rm -rf /var/tmp/*
# EPEL & Leenooks packages
RUN yum -y install --enabler remi-php56 \
httpd \
mariadb-server \
php \
php-gd \
php-ldap \
php-mbstring \
php-mysql \
php-pdo \
php-xml \
php-composer-installers.noarch \
php-opcache \
m4 \
opendkim \
sendmail \
sendmail-cf \
awstats \
ln-http \
ln-awstats \
ln-mail-server \
openssh-server \
git \
&& yum clean all
COPY .my.cnf /root/
COPY 1?-default.conf /etc/httpd/conf.d/
COPY sshd /etc/sysconfig/sshd
COPY sshd_config /etc/ssh/
RUN ln -f /etc/.ln/httpd/conf.d/awstats.conf /etc/httpd/conf.d/awstats.conf && ln -f /etc/.ln/opendkim.conf /etc/opendkim.conf
RUN useradd -c "Hosting Admin User" -G apache -d /etc/leenooks/user -M lamp
RUN useradd -rc "Composer" -m composer -s /sbin/nologin && su composer -s /bin/bash -lc "composer global require laravel/installer && composer require --dev --no-update xethron/migrations-generator:dev-l5 && composer require --dev --no-update way/generators:dev-feature/laravel-five-stable && composer config repositories.repo-name git git@github.com:jamisonvalenta/Laravel-4-Generators.git"
EXPOSE 22 80
COPY init /sbin/
# Starting
ENTRYPOINT [ "/sbin/init" ]
LABEL cron.hourly root:/usr/sbin/awstats.sh
LABEL cron.daily root:/usr/bin/tdp.mysql.sh -s information_schema:performance_schema
#VOLUME [ "/etc/leenooks","/var/lib/mysql","/var/www/html" ]
VOLUME [ "/etc/leenooks" ]
RUN rmdir /var/lib/mysql; ln -sf /etc/leenooks/database /var/lib/mysql; mv /var/www/html /var/www/html.old; ln -sf /etc/leenooks/html /var/www/html; ln -sf /etc/leenooks/tsm/dsm.sys /opt/tivoli/tsm/client/api/bin64/dsm.sys; ln -sf /etc/leenooks/tsm/dsm.opt /opt/tivoli/tsm/client/api/bin64/dsm.opt;