Answer the question
In order to leave comments, you need to log in
Laradock: "docker-compose build workspace" - failed - what to do?
Today I decided to try PHP version 8 in the project :-) I cloned Laradock from GitHub into the folder of the new project, launched it, and, unexpectedly, php -v
inside the workspace I got 7.4, despite the fact that I set it in .env PHP_VERSION=8.0
, phpinfo() on the site also gave out 7.4
Then I did
docker-compose build php-fpm
it and it solved the issue: on the site phpinfo() began to show PHP Version 8.0.15
And when I started changing php-cli and launched
docker-compose build workspace
it refused to build, at step 14 it gave out a sheet of warnings three screens down, and ended it like this:
ERROR: Service 'workspace' failed to build: The command '/bin/sh -c set -xe; apt-get update -yqq && pecl channel-update pecl.php.net && groupadd -g ${PGID} laradock && useradd -l -u ${PUID} -g laradock -m laradock -G docker_env && usermod -p "*" laradock -s /bin/bash && apt-get install -yqq apt-utils libzip-dev zip unzip php${LARADOCK_PHP_VERSION}-zip nasm && php -m | grep -q 'zip'' returned a non-zero code: 1
docker-compose build --no-cache workspace
Answer the question
In order to leave comments, you need to log in
Docker, in general, has nothing to do with it, the error occurs in one of the commands regarding updating and installing packages.
Try changing the Dockerfile as recommended in Support php 8.0.0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question