Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.3'
- volumes:
- mysql.db.volume:
- services:
- mysql.db:
- restart: always
- image: mysql:5.7.19
- container_name: mysql.db
- command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
- volumes:
- - mysql.db.volume:/var/lib/mysql
- environment:
- MYSQL_DATABASE: 'hoge_db'
- MYSQL_USER : 'hoge'
- MYSQL_PASSWORD: 'hoge'
- MYSQL_ROOT_PASSWORD: 'password'
- TZ: "Asia/Tokyo"
- ports:
- - '33306:3306'
- cakephp.web:
- container_name: cakephp.web
- build: ./docker-image
- privileged: true
- ports:
- - '8001:80'
- - '2223:22'
- depends_on:
- - mysql.db
- links:
- - mysql.db
- FROM centos:7
- #time setting
- RUN cp -fp /usr/share/zoneinfo/Japan /etc/localtime
- #prepare
- RUN yum install -y unzip
- # Add yum repositories. (epel and remi)
- RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm &&
- rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
- RUN yum install -y epel-release
- RUN yum update -y epel-release
- #php7 install
- #RUN yum install -y --enablerepo=remi-php71,epel php php-cli php-common php-devel php-fpm php-gd php-gmp php-intl php-mbstring php-mcrypt php-mysql php-opcache php-pdo php-pear-MDB2-Driver-mysqli php-pecl-memcached php-pecl-msgpack php-pecl-xdebug php-phpunit-PHPUnit php-xml
- RUN yum install -y --enablerepo=remi-php71,epel php php-cli php-common php-devel php-fpm php-gd php-gmp php-intl php-mbstring php-mcrypt php-mysql php-opcache php-pdo php-pecl-memcached php-pecl-msgpack php-pecl-xdebug php-phpunit-PHPUnit php-xml
- #composer install
- RUN curl -sS https://getcomposer.org/installer | php
- RUN mv composer.phar /usr/local/bin/composer
- #git install
- RUN yum install -y git
- #cakephp install
- RUN cd /var
- RUN composer create-project --prefer-dist -n cakephp/app /var/web_app
- RUN ln -s /var/phm_app/webroot /var/www/html/phm
- #COPY var/cakephp/webroot/.htaccess /var/phm_app/webroot/.htaccess
- #plugin install
- RUN cd /var/web_app
- RUN composer require muffin/trash
- RUN composer require ceeram/cakephp-blame
- #httpd install
- RUN yum install -y httpd
- RUN yum install -y httpd-devel
- #COPY etc/httpd/conf.d/phm.conf /etc/httpd/conf.d/phm.conf
- #ssh install
- RUN yum install -y openssh-server
- RUN passwd -d root
- #COPY etc/sshd_config /etc/ssh/sshd_config
- #service service entry
- RUN systemctl enable httpd
- RUN systemctl enable sshd
- #post processing
- VOLUME ["/var/www/html"]
- CMD ["/sbin/init"]
- Step 20/26 : RUN pwd
- /
- Step 21/26 : RUN cd /tmp
- Step 22/26 : RUN pwd
- /
- Step 23/26 : WORKDIR /tmp
- Step 24/26 : RUN pwd
- /tmp
- RUN set -x
- && cd /var/web_app
- && composer require muffin/trash
- && composer require ceeram/cakephp-blame
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement