Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose up exited with code 1 #67

Closed
lgXenos opened this issue Dec 13, 2018 · 6 comments
Closed

docker-compose up exited with code 1 #67

lgXenos opened this issue Dec 13, 2018 · 6 comments

Comments

@lgXenos
Copy link

lgXenos commented Dec 13, 2018

Log:

$ docker-compose build
......................................
.................. all ok...........

$ docker-compose up
WARNING: The GITHUB_API_TOKEN variable is not set. Defaulting to a blank string.
Pulling web (phundament/nginx-one:1.9-5.1.1)...
1.9-5.1.1: Pulling from phundament/nginx-one
51f5c6a04d83: Pull complete
a3ed95caeb02: Pull complete
640c8f3d0eb2: Pull complete
a4335300aa89: Pull complete
48f5bf1cb454: Pull complete
bf95fc845e39: Pull complete
03b5acc6259d: Pull complete
22de4320976f: Pull complete
Digest: sha256:65008b29a6c8916884285581a45d4017f38572e69a0c797d5c17cf382b94eb76
Status: Downloaded newer image for phundament/nginx-one:1.9-5.1.1
Creating yii2fpm_php_1 ... done
Creating yii2fpm_web_1 ... done
Attaching to yii2fpm_php_1, yii2fpm_web_1
php_1  | error:  does not exist
php_1  | 
php_1  | usage: /usr/local/bin/docker-php-ext-enable [options] module-name [module-name ...]
php_1  |    ie: /usr/local/bin/docker-php-ext-enable gd mysqli
web_1  | 2018/12/13 13:13:21 [emerg] 11#11: host not found in upstream "php" in /etc/nginx/nginx.conf:66
php_1  |        /usr/local/bin/docker-php-ext-enable pdo pdo_mysql
web_1  | nginx: [emerg] host not found in upstream "php" in /etc/nginx/nginx.conf:66
php_1  |        /usr/local/bin/docker-php-ext-enable --ini-name 0-apc.ini apcu apc
php_1  | 
php_1  | Possible values for module-name:
php_1  | bcmath.so curl.so exif.so gd.so iconv.so imagick.so intl.so mbstring.so mongodb.so opcache.so pdo_mysql.so pdo_pgsql.so soap.so zip.so
php_1  | 
php_1  | Some of the above modules are already compiled into PHP; please check
php_1  | the output of "php -i" to see which modules are already loaded.
yii2fpm_php_1 exited with code 1
yii2fpm_web_1 exited with code 1

.env

## Environment variables for docker-compose command

## Windows settings
# COMPOSE_PATH_SEPARATOR=:

## Apache
#COMPOSE_PROJECT_NAME=yii2apache
#COMPOSE_FILE=docker-compose.yml:docker-compose.apache.yml
#DOCKERFILE_FLAVOUR=debian
#PHP_BASE_IMAGE_VERSION=7.2-apache

# Xdebug (calling the xdebug.remote_host on 9009 port)
PHP_ENABLE_XDEBUG=1

## PHP-fpm & nginx
COMPOSE_PROJECT_NAME=yii2fpm
COMPOSE_FILE=docker-compose.yml:docker-compose.fpm-nginx.yml
DOCKERFILE_FLAVOUR=alpine
PHP_BASE_IMAGE_VERSION=7.1.9-fpm-alpine

## Built image name
PHP_IMAGE_NAME=local/yiisoftware/yii2-php
PHP_IMAGE_VERSION_SUFFIX=
@schmunk42
Copy link
Contributor

Could you try the Debian version.

@lgXenos
Copy link
Author

lgXenos commented Dec 14, 2018

Could you try the Debian version.

How can I do this? I'm newbie in dockers... :(

For example replacing this

DOCKERFILE_FLAVOUR=debian

Make new error

$ docker-compose rm
$ docker rm $(docker ps -aq)

$ docker-compose build
WARNING: The GITHUB_API_TOKEN variable is not set. Defaulting to a blank string.
web uses an image, skipping
Building php
Step 1/14 : ARG PHP_BASE_IMAGE_VERSION
Step 2/14 : FROM php:${PHP_BASE_IMAGE_VERSION}
 ---> 5ec2c0136450
Step 3/14 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Running in e7bd37a666f2
Removing intermediate container e7bd37a666f2
 ---> c57a1685ae8a
Step 4/14 : RUN apt-get update &&     apt-get -y install         gnupg2 &&     apt-key update &&     apt-get update &&     apt-get -y install             g++             git             curl             imagemagick             libfreetype6-dev             libcurl3-dev             libicu-dev             libfreetype6-dev             libjpeg-dev             libjpeg62-turbo-dev             libmagickwand-dev             libpq-dev             libpng-dev             libxml2-dev             libzip-dev             zlib1g-dev             mysql-client             openssh-client             nano             unzip         --no-install-recommends &&         apt-get clean &&         rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ---> Running in 1b5962947559
/bin/sh: apt-get: not found
ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update &&     apt-get -y install         gnupg2 &&     apt-key update &&     apt-get update &&     apt-get -y install             g++             git             curl             imagemagick             libfreetype6-dev             libcurl3-dev             libicu-dev             libfreetype6-dev             libjpeg-dev             libjpeg62-turbo-dev             libmagickwand-dev             libpq-dev             libpng-dev             libxml2-dev             libzip-dev             zlib1g-dev             mysql-client             openssh-client             nano             unzip         --no-install-recommends &&         apt-get clean &&         rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 127

@schmunk42
Copy link
Contributor

Uncomment the ## Apache section and comment ## PHP-fpm & nginx section.

@lgXenos
Copy link
Author

lgXenos commented Dec 17, 2018

Yes, I think that apache-build works fine
But what for nginx?

$ docker-compose up
WARNING: The GITHUB_API_TOKEN variable is not set. Defaulting to a blank string.
Creating network "yii2apache_default" with the default driver
Creating yii2apache_php_1 ... done
Attaching to yii2apache_php_1
php_1  | usermod: no changes
php_1  | Enabled xdebug
php_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.2. Set the 'ServerName' directive globally to suppress this message
php_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.2. Set the 'ServerName' directive globally to suppress this message
php_1  | [Mon Dec 17 06:23:16.196400 2018] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
php_1  | [Mon Dec 17 06:23:16.196811 2018] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

@schmunk42
Copy link
Contributor

Could you try with nginx on Debian

COMPOSE_PROJECT_NAME=yii2fpm
COMPOSE_FILE=docker-compose.yml:docker-compose.fpm-nginx.yml
DOCKERFILE_FLAVOUR=debian
PHP_BASE_IMAGE_VERSION=7.2-fpm

@lgXenos
Copy link
Author

lgXenos commented Dec 17, 2018

Yeeeea.... It's work )
Thnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants