meanbee / docker-magento2

🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI
MIT License
454 stars 244 forks source link

Recent usage? #67

Closed hickscorp closed 7 years ago

hickscorp commented 7 years ago

Has anyone used this repository recently?

I'm getting several errors when trying to bring it up:

cli_1      | Starting Mail Transport Agent (MTA): sendmail.
cli_1      | Do not run Composer as root/super user! See https://getcomposer.org/root for details
cli_1      | Do not run Composer as root/super user! See https://getcomposer.org/root for details
magento2_cli_1 exited with code 0

Apparently, varnish fails earlier as well:

varnish_1  | bind(): Cannot assign requested address
varnish_1  | child (16) Started
varnish_1  | Child (16) said Child starts

(I don't have anything on 80, and the docker daemon runs as root).

Any hint please?

punkstar commented 7 years ago

Can you provide your docker compose config please?

hickscorp commented 7 years ago

@punkstar What does that mean? We configured the environment as described in the readme, essentially only changing the github / magento connect tokens. We tried with and without M2SETUP_USE_SAMPLE_DATA=true, it didn't make any difference.

We are really using docker-compose.yml from the repo as vanilla as it gets.

I think the issue might be a recent version of composer refusing to run as root (which is the standard with docker), even tho I saw several mechanisms to drop privileges in the scripts. We also had another error earlier, fpm complaining about not liking to being ran as root as well.

punkstar commented 7 years ago

@hickscorp I'm finding it difficult to see how the images in this repository are causing your problem. Anything you can spot that might be different from my setup to yours?

Current environment:

sterling:test nrj$ docker --version
Docker version 1.12.2, build bb80604

sterling:test nrj$ docker-compose --version
docker-compose version 1.8.1, build 878cff1

You can see my test and output below:

sterling:test nrj$ wget https://raw.githubusercontent.com/meanbee/docker-magento2/master/docker-compose.yml
--2017-04-27 11:03:06--  https://raw.githubusercontent.com/meanbee/docker-magento2/master/docker-compose.yml
Resolving raw.githubusercontent.com... 151.101.16.133
Connecting to raw.githubusercontent.com|151.101.16.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2169 (2.1K) [text/plain]
Saving to: ‘docker-compose.yml’

docker-compose.yml                      100%[===============================================================================>]   2.12K  --.-KB/s    in 0s

2017-04-27 11:03:06 (29.1 MB/s) - ‘docker-compose.yml’ saved [2169/2169]

sterling:test nrj$ docker-compose pull
Pulling appdata (tianon/true:latest)...
latest: Pulling from tianon/true
Digest: sha256:e6c1cc8ed45eee2c5343775c88362e85f7414ac4530dc7446ac89e946f0664f8
Status: Image is up to date for tianon/true:latest
Pulling dbdata (tianon/true:latest)...
latest: Pulling from tianon/true
Digest: sha256:e6c1cc8ed45eee2c5343775c88362e85f7414ac4530dc7446ac89e946f0664f8
Status: Image is up to date for tianon/true:latest
Pulling db (mariadb:10)...
10: Pulling from library/mariadb
Digest: sha256:7cf3822d4582d5d0d95c2512ea6b5d2d4bdb4b299ce7ed67cb5c84df081cf14c
Status: Image is up to date for mariadb:10
Pulling cron (meanbee/magento2-php:7.0-cli)...
7.0-cli: Pulling from meanbee/magento2-php
Digest: sha256:8c22ba82038aabfc50628f8d77d85ac1e1a109b2270ad60bcdd2f2417a8bb381
Status: Image is up to date for meanbee/magento2-php:7.0-cli
Pulling fpm (meanbee/magento2-php:7.0-fpm)...
7.0-fpm: Pulling from meanbee/magento2-php
Digest: sha256:4574547cfd2fdccf2b9eb378b73648b998842ef258c8f683348c315ce78105f2
Status: Image is up to date for meanbee/magento2-php:7.0-fpm
Pulling cli (meanbee/magento2-php:7.0-cli)...
7.0-cli: Pulling from meanbee/magento2-php
Digest: sha256:8c22ba82038aabfc50628f8d77d85ac1e1a109b2270ad60bcdd2f2417a8bb381
Status: Image is up to date for meanbee/magento2-php:7.0-cli
Pulling web (meanbee/magento2-nginx:1.9)...
1.9: Pulling from meanbee/magento2-nginx
Digest: sha256:de66c2dc4143a85986f92d1cde577e51073d40fe2d43963bcef15fdf6d9a8e3a
Status: Image is up to date for meanbee/magento2-nginx:1.9
Pulling varnish (meanbee/magento2-varnish:latest)...
latest: Pulling from meanbee/magento2-varnish
Digest: sha256:6d7d758081bdb9e7c4efcc36c8ce6457fe27940101c56ee057465c5d8d2abad3
Status: Image is up to date for meanbee/magento2-varnish:latest

sterling:test nrj$ docker-compose up -d
Creating test_appdata_1
Creating test_dbdata_1
Creating test_db_1
Creating test_cli_1
Creating test_cron_1
Creating test_fpm_1
Creating test_web_1
Creating test_varnish_1

sterling:test nrj$ docker-compose ps
     Name                   Command               State                Ports
-----------------------------------------------------------------------------------------
test_appdata_1   /true                            Exit 0
test_cli_1       /usr/local/bin/docker-envi ...   Exit 0
test_cron_1      /usr/local/bin/docker-envi ...   Up
test_db_1        docker-entrypoint.sh mysqld      Up       0.0.0.0:32773->3306/tcp
test_dbdata_1    /true                            Exit 0
test_fpm_1       /usr/local/bin/docker-envi ...   Up       0.0.0.0:32774->9000/tcp
test_varnish_1   /bin/sh -c /start.sh             Up       0.0.0.0:32776->80/tcp
test_web_1       /usr/local/bin/docker-envi ...   Up       443/tcp, 0.0.0.0:32775->80/tcp

sterling:test nrj$ docker-compose logs varnish
Attaching to test_varnish_1
varnish_1  | child (16) Started
varnish_1  | Child (16) said Child starts

The composer warning can be ignored and is expected when using these images.