简体   繁体   中英

Laradock changing php-fpm version inside workspace

I am not able to change the php-fpm version inside the workspace. I'm trying to install PHP version 7.1 My docker version is

 Docker version 18.06.1-ce, build e68fc7a

Every time it installs PHP version

PHP 7.2.4-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Apr  5 2018 08:53:57) ( NTS )

My dockerfile inside workspace looks like as follows:

ARG LARADOCK_PHP_VERSION=7.1

FROM laradock/workspace:2.2-${LARADOCK_PHP_VERSION}

LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"

ARG LARADOCK_PHP_VERSION

# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive

# Start as root
USER root

###########################################################################
# Laradock non-root user:
###########################################################################

# Add a non-root user to prevent files being created with root permissions on host machine.
ARG PUID=1000
ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}

change PHP_VERSION in .env file

Build fpm and cli for new version

docker-compose build php-fpm                       
docker-compose build workspace                                               

Restart Container to use new version of php

docker-compose down                       
docker-compose up -d nginx mysql workspace redis

Change the value in .env only. Rebuild the containers with --no-cache

docker-compose down

docker-compose build --no-cache php-fpm

docker-compose build --no-cache workspace

docker-compose up -d phpmyadmin workspace php-fpm nginx mysql maildev redis redis-webui #dockup

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM