ezimuel / php-microservices-workshop

Source code of Developing microservices with PHP workshop
BSD 3-Clause "New" or "Revised" License
17 stars 7 forks source link

Error when executing docker-compose up #1

Open tasso85 opened 5 years ago

tasso85 commented 5 years ago

I was trying the docker installation, and I come to an error when firing up the containers.

I have first cloned the repository with

git clone https://github.com/ezimuel/php-microservices-workshop

then went into the directory created with

cd php-microservices-workshop

and finally I ran

docker-compose up

the build process seems to go fine but, in the end, I see these errors from the containers:

php_1             | /usr/local/bin/docker-php-entrypoint: 9: exec: ./vendor/bin/zend-expressive-swoole: not found
php-microservices-workshop_php_1 exited with code 127
elasticsearch     | ERROR: [1] bootstrap checks failed
elasticsearch     | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch     | [2019-05-09T11:34:57,005][INFO ][o.e.n.Node               ] [lhU2gZ6] stopping ...
elasticsearch     | [2019-05-09T11:34:57,068][INFO ][o.e.n.Node               ] [lhU2gZ6] stopped
elasticsearch     | [2019-05-09T11:34:57,068][INFO ][o.e.n.Node               ] [lhU2gZ6] closing ...
elasticsearch     | [2019-05-09T11:34:57,087][INFO ][o.e.n.Node               ] [lhU2gZ6] closed
elasticsearch     | [2019-05-09T11:34:57,091][INFO ][o.e.x.m.p.NativeController] [lhU2gZ6] Native controller process has stopped - no new native processes can be started
elasticsearch exited with code 78
elasticsearch2    | ERROR: [1] bootstrap checks failed
elasticsearch2    | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch2    | [2019-05-09T11:34:57,918][INFO ][o.e.n.Node               ] [WJVq_21] stopping ...
elasticsearch2    | [2019-05-09T11:34:57,933][INFO ][o.e.n.Node               ] [WJVq_21] stopped
elasticsearch2    | [2019-05-09T11:34:57,934][INFO ][o.e.n.Node               ] [WJVq_21] closing ...
elasticsearch2    | [2019-05-09T11:34:57,948][INFO ][o.e.n.Node               ] [WJVq_21] closed
elasticsearch2    | [2019-05-09T11:34:57,951][INFO ][o.e.x.m.p.NativeController] [WJVq_21] Native controller process has stopped - no new native processes can be started
elasticsearch2 exited with code 78

am I doing anything wrong?

SalvatorePollaci commented 5 years ago

O.S.: MacOS Mojave 10.14.4 Docker: Docker Desktop 2.0.3.0

I'm getting a similar error,docker-compose up -d finishes but docker-compose ps states that php-microservices-workshop_php_1 has state exit. Moreover docker-compose build give the following error message:

➜  php-microservices-workshop git:(master) docker-compose build

elasticsearch uses an image, skipping
elasticsearch2 uses an image, skipping
Building php
Step 1/3 : FROM php:7.3-cli
 ---> 47174070e3d8
Step 2/3 : RUN pecl install swoole && docker-php-ext-enable swoole
 ---> Running in e37516b1d6c6
pecl/swoole is already installed and is the same as the released version 4.3.3
install failed
ERROR: Service 'php' failed to build: The command '/bin/sh -c pecl install swoole && docker-php-ext-enable swoole' returned a non-zero code: 1
drAlberT commented 5 years ago

vm.max_map_count [65530] is too low, increase to at least [262144]

You have to increase this value. Use sysctl. conf... On the host machine