LoginSignup
0
1

More than 5 years have passed since last update.

CentOS7でPHP7.1が動く環境をDocker上に作る

Posted at

コンテナの作成起動とbash

$ docker run --name centos7 -itd centos:centos7
$ docker exec -it centos7 /bin/bash

PHP7.1のインストール

epelとremiリポジトリが必要なので入れておく。
その後でremi-php71からphpをインストール

$ yum update -y && yum -y install epel-release

$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

$ yum install --enablerepo=remi,remi-php71 -y php

確認

$ php -v

Screen Shot 2018-03-29 at 13.37.45.png

(PHP7を使うだけならphp7のイメージを拾ってきたほうが良いです。

0
1
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
1