FROM centos:7
MAINTAINER Donfig <choi.jh@idcjp.jp>

# My comment here
RUN echo '1. Set environment'
ENV LANG ko_KR.UTF-8

RUN echo 'LANG="$LANG"' > /etc/locale.conf
RUN unlink /etc/localtime
RUN ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

RUN echo 'export LANG="$LANG"' >> /etc/bashrc
RUN echo 'export LANGUAGE="$LANG"' >> /etc/bashrc
RUN source /etc/bashrc

RUN echo '2. Install need Package'
RUN yum makecache fast
RUN yum -y install epel-release net-tools vi vim-enhanced;
RUN yum -y update; yum clean all
RUN yum -y install mariadb nginx supervisor
RUN yum -y install  https://rpms.remirepo.net/enterprise/remi-release-7.rpm
RUN yum -y install --enablerepo=remi-php56 \
    libmcrypt openssl memcached \
    php \
    php-devel \
    php-common \
    php-gd \
    php-ast \
    php-cli \
    php-dba \
    php-ffi \
    php-fpm \
    php-dbg \
    php-pdo \
    php-intl \
    php-json \
    php-mcrypt \
    php-mysqlnd \
    php-enchant \
    php-bcmath \
    php-xml \
    php-xmlrpc \
    php-opcache \
    php-process \
    php-mbstring \
    php-pear \
    php-pecl-crypto \
    php-pecl-imagick \
    php-pecl-memcache \
    php-pecl-memcached \
    php-pecl-redis \
    php-pecl-xdebug
RUN yum -y update; yum clean all

RUN echo '3. Setting Supervisor for Web'
COPY  supervisord.conf /etc/supervisord.conf

EXPOSE 80
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
