LoginSignup
0
0

More than 5 years have passed since last update.

Docker 初期設定

Last updated at Posted at 2018-07-19
dockerfile
# DOCKER CONFIG
FROM centos:7

# yum-config-manager のインストール
RUN yum -y install yum-utils

# yum repository の追加
RUN yum -y update
RUN yum -y install epel-release
RUN yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
RUN yum -y install http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

# https://rpms.remirepo.net/RPM-GPG-KEY-remi2018
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*

# yum repository の有効化
RUN yum-config-manager --enable  remi-php71

# SED インストール
RUN yum -y install sed

# NKF インストール
RUN yum -y install nkf

# WGET のインストール
RUN yum -y install wget

# ZIP のインストール
RUN yum -y install zip unzip

# GCC のインストール
RUN yum -y install gcc

# OPEN-SSL のインストール
RUN yum -y install openssl openssl-devel

# OPEN-SSL のインストール
RUN yum -y install curl curl-devel

# HTTPD インストール
RUN yum -y install httpd  httpd-devel
RUN systemctl enable httpd
RUN systemctl start  httpd

#  MYSQL のインストール
RUN yum -y install mysql-community-client  mysql-community-server  mysql-community-devel
RUN systemctl enable mysqld
RUN systemctl start  mysqld
RUN mysqladmin password Passw0rd! -u root -p$(cat /var/log/mysqld.log  | grep root@localhost | sed -e "s/.*root@localhost: //g")

# PHP のインストール
RUN yum -y install php php-devel php-intl php-json php-mbstring php-mysqlnd php-pdo php-xml php-zip

# COMPOSER のインストール
RUN mkdir -p /usr/local/src/composer/
WORKDIR /usr/local/src/composer/
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer

# GIT のインストール
RUN mkdir -p /usr/local/src/git/
WORKDIR /usr/local/src/git/
RUN wget https://github.com/git/git/archive/master.zip 
RUN unzip master.zip
WORKDIR /usr/local/src/git/git-master/
RUN make
RUN make test
RUN make install

# docker のインストール
# RUN yum -y install docker docker-compose docker-client
# RUN systemctl enable docker 


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0