0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrant・Docker上でPHPのバージョンが5系だった時の対処

0
Last updated at Posted at 2021-03-09

Dockerfile上で
RUN yum -y install —enablerepo= remi-php72 php php-mbstring php-mysqlnd php-pdo
と記述し
docker-compose build
とコマンド打ち込むもDocker上のPHPのバージョンが5.4.45のままだった。
スクリーンショット 2021-03-07 9.32.53.png

docker ps -a
で現在Docker上に出来ているコンテナを確認し、

docker rm (コンテナID)

docker images
docker rmi (イメージID)

を実行し、ガベージファイルを削除した後にもう一度ビルドしても結果は変わらず。そんなことを2度、3度繰り返しても埒が明かないまま一夜がすぎそうになったが解決したのでここに方法を記したい。

RUN yum -y install —enablerepo= remi-php72 php php-mbstring php-mysqlnd php-pdo

RUN yum -y install --enablerepo=remi,remi-php72 php php-mbstring php-mysqlnd php-pdo

としたところ解決しました。ちゃんちゃん。
スクリーンショット 2021-03-10 0.09.21.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?