Created
December 26, 2016 15:15
-
-
Save ymsrk/626e62985ef47fe1381cb0646f7fe665 to your computer and use it in GitHub Desktop.
docker on centos on laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos6.8 | |
# update & clean | |
RUN yum update -y; yum clean all; | |
# support Japanese | |
RUN yum -y groupinstall "Japanese Support"; yum clean all; | |
# install sudo | |
RUN yum install -y sudo git wget curl tree; yum clean all; | |
# root setup passwd | |
RUN echo "root:abc1234" | chpasswd | |
# create user | |
RUN groupadd -g 5000 dev-sec && \ | |
useradd -c 'dev-sec user' -d /home/dev-sec -g dev-sec -m dev-sec && \ | |
echo "dev-sec:abc1234" | chpasswd | |
# sudo user | |
RUN echo 'dev-sec ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
# Timezone | |
RUN cp -p /usr/share/zoneinfo/Asia/Tokyo /etc/localtime | |
# use dev-sec | |
USER dev-sec | |
WORKDIR /home/dev-sec | |
# PHP 5.6 install | |
RUN sudo rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm && \ | |
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
RUN sudo yum install -y --enablerepo=remi --enablerepo=remi-php56 \ | |
php \ | |
php-opcache \ | |
php-devel \ | |
php-mbstring \ | |
php-mcrypt \ | |
php-mysqlnd \ | |
php-phpunit-PHPUnit \ | |
php-pecl-xdebug \ | |
php-pecl-xhprof | |
RUN sudo yum clean all | |
# data.timezone | |
RUN sed -ri 's/;date.timezone =/date.timezone = Asia\/Tokyo/g' /etc/php.ini | |
# Composer | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
EXPOSE 8000 | |
CMD ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment