Laradocks Docker-Komposition besteht aus Moos

Umgebung

Phänomen

$ git clone https://github.com/Laradock/laradock.git
$ cd laradock
$ docker-compose up -d php-fpm nginx mysql phpmyadmin workspace

Abkürzung

Step 123/291 : RUN if [ ${INSTALL_AST} = true ]; then     if [ $(php -r "echo PHP_MAJOR_VERSION;") != "5" ]; then         printf "\n" | pecl -q install ast-${AST_VERSION} &&         echo "extension=ast.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/ast.ini &&         phpenmod -v ${LARADOCK_PHP_VERSION} -s cli ast     ;fi ;fi
 ---> Running in f765b424fea4
ERROR: `phpize' failed
ERROR: Service 'workspace' failed to build : The command '/bin/sh -c if [ ${INSTALL_AST} = true ]; then     if [ $(php -r "echo PHP_MAJOR_VERSION;") != "5" ]; then         printf "\n" | pecl -q install ast-${AST_VERSION} &&         echo "extension=ast.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/ast.ini &&         phpenmod -v ${LARADOCK_PHP_VERSION} -s cli ast     ;fi ;fi' returned a non-zero code: 1

Lösungen

https://github.com/laradock/laradock/issues/2738#issuecomment-706938037

Die Version von PHP, die in "env-example" beschrieben ist und von "https: // github.com / Laradock / laradock.git" geklont wurde, ist 7.3. Ich habe das so kopiert wie es war und .env erstellt, also war die PHP-Version 7.3.

### PHP Version ###########################################

# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM).
# Accepted values: 7.4 - 7.3 - 7.2 - 7.1 - 7.0 - 5.6
PHP_VERSION=7.3

Das Einstellen der PHP-Version auf 7.4 funktioniert einwandfrei! Schreiben Sie also die .env-Datei neu.

.env


# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM).
# Accepted values: 7.4 - 7.3 - 7.2 - 7.1 - 7.0 - 5.6
PHP_VERSION=7.4

Führen Sie nach dem Wechsel zu 7.4 erneut "Docker-Compose Up" aus

$ docker-compose up -d php-fpm nginx mysql phpmyadmin workspace

Abkürzung

Successfully built 8d1580fef486
Successfully tagged laradock_nginx:latest
WARNING: Image for service nginx was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating laradock_docker-in-docker_1 ... done
Creating laradock_mysql_1            ... done
Creating laradock_workspace_1        ... done
Creating laradock_phpmyadmin_1       ... done
Creating laradock_php-fpm_1          ... done
Creating laradock_nginx_1            ... done

Es scheint funktioniert zu haben.

Mission Complete

Recommended Posts

Laradocks Docker-Komposition besteht aus Moos
Was ist Docker-Compose?
Was ist Docker-Compose (persönliches Memorandum)
[Rails] So beschleunigen Sie das Docker-Compose