Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. version: '3.3'
  2. volumes:
  3. mysql.db.volume:
  4. services:
  5. mysql.db:
  6. restart: always
  7. image: mysql:5.7.19
  8. container_name: mysql.db
  9. command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
  10. volumes:
  11. - mysql.db.volume:/var/lib/mysql
  12. environment:
  13. MYSQL_DATABASE: 'hoge_db'
  14. MYSQL_USER : 'hoge'
  15. MYSQL_PASSWORD: 'hoge'
  16. MYSQL_ROOT_PASSWORD: 'password'
  17. TZ: "Asia/Tokyo"
  18. ports:
  19. - '33306:3306'
  20.  
  21. cakephp.web:
  22. container_name: cakephp.web
  23. build: ./docker-image
  24. privileged: true
  25. ports:
  26. - '8001:80'
  27. - '2223:22'
  28. depends_on:
  29. - mysql.db
  30. links:
  31. - mysql.db
  32.  
  33. FROM centos:7
  34.  
  35. #time setting
  36. RUN cp -fp /usr/share/zoneinfo/Japan /etc/localtime
  37.  
  38. #prepare
  39. RUN yum install -y unzip
  40.  
  41. # Add yum repositories. (epel and remi)
  42. RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm &&
  43. rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
  44. RUN yum install -y epel-release
  45. RUN yum update -y epel-release
  46.  
  47. #php7 install
  48. #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
  49. 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
  50.  
  51. #composer install
  52. RUN curl -sS https://getcomposer.org/installer | php
  53. RUN mv composer.phar /usr/local/bin/composer
  54.  
  55. #git install
  56. RUN yum install -y git
  57.  
  58. #cakephp install
  59. RUN cd /var
  60. RUN composer create-project --prefer-dist -n cakephp/app /var/web_app
  61. RUN ln -s /var/phm_app/webroot /var/www/html/phm
  62. #COPY var/cakephp/webroot/.htaccess /var/phm_app/webroot/.htaccess
  63.  
  64. #plugin install
  65. RUN cd /var/web_app
  66. RUN composer require muffin/trash
  67. RUN composer require ceeram/cakephp-blame
  68.  
  69. #httpd install
  70. RUN yum install -y httpd
  71. RUN yum install -y httpd-devel
  72. #COPY etc/httpd/conf.d/phm.conf /etc/httpd/conf.d/phm.conf
  73.  
  74. #ssh install
  75. RUN yum install -y openssh-server
  76. RUN passwd -d root
  77. #COPY etc/sshd_config /etc/ssh/sshd_config
  78.  
  79. #service service entry
  80. RUN systemctl enable httpd
  81. RUN systemctl enable sshd
  82.  
  83. #post processing
  84. VOLUME ["/var/www/html"]
  85. CMD ["/sbin/init"]
  86.  
  87. Step 20/26 : RUN pwd
  88. /
  89. Step 21/26 : RUN cd /tmp
  90. Step 22/26 : RUN pwd
  91. /
  92. Step 23/26 : WORKDIR /tmp
  93. Step 24/26 : RUN pwd
  94. /tmp
  95.  
  96. RUN set -x
  97. && cd /var/web_app
  98. && composer require muffin/trash
  99. && composer require ceeram/cakephp-blame
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement