laminas / getlaminas.org

getlaminas.org source code
https://getlaminas.org
BSD 3-Clause "New" or "Revised" License
68 stars 23 forks source link

Not able to create Docker container from built image #4

Closed thexpand closed 4 years ago

thexpand commented 5 years ago

The image builds flawlessly. However, creating a container from the built image fails. This happens, because of the volume mapping and the missing vendor directory after running docker-compose up. The docker-compose.yml file defines a volume for all files within the root directory:

    volumes:
      - .:/var/www

When in development, this overwrites the contents of the image, thus removing the vendor directory. On the other hand, the entry point file tries to start swoole by running the zend-expressive-swoole start binary, which is located in the vendor directory, resulting in the following error:

php_1 | Could not open input file: vendor/bin/zend-expressive-swoole getlaminasorg_php_1 exited with code 1

This could be resolved by running composer install on the local machine, but that doesn't seem right. The machine might not meet the dependencies in the composer.json, so it's not an option.

We should think of a way on how to avoid this.

UPDATE: The same issue is valid for the assets in public/css. They get overwritten by the volume mount.

ghost commented 5 years ago

This is the exact problem I experienced while executing docker-compose up. I tried to execute manually composer install but obviously I received a bunch of error associated with ext-swoole not installed. I'm stuck.

bu3tt1 commented 5 years ago

The problem seems be solved with https://github.com/laminas/getlaminas.org/pull/7

weierophinney commented 4 years ago

Since we're no longer using Swoole to deploy the site, this is a moot issue.