sparse-fall-78248
11/04/2020, 3:36 PMhigh-pencil-62400
11/04/2020, 7:05 PMhigh-pencil-62400
11/04/2020, 7:06 PMdocker run -it spryker_cli:dev idsparse-fall-78248
11/04/2020, 9:32 PMproblems@failwhale:~/shop$ id
uid=1001(problems) gid=1001(problems) groups=1001(problems),997(docker)
problems@failwhale:~/shop$ docker run -it anon_dev_cli:dev id
uid=1001(spryker) gid=82(www-data) groups=82(www-data)
problems@failwhale:~/shop$ docker/sdk cli id
--> DEVELOPMENT MODE
uid=1001(spryker) gid=82(www-data) groups=82(www-data)
Starting docker/sdk works just fine, BUT when I reach the point where the demo data gets initialized, a log is trying to get written and that fails:
Command propel-copy-schema [vendor/bin/console propel:schema:copy] (In progress...)
Store: DE | Environment: docker
Clean schema directory
Copy and merge schema files
UnexpectedValueException - Exception: There is no existing directory at "/var/log/spryker/DE/ZED" and it could not be created: Permission denied
in /data/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php (172)
Command: vendor/bin/console propel:schema:copy
Trace:
#0 /data/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(100): Monolog\Handler\StreamHandler->createDir()
#1 /data/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(42): Monolog\Handler\StreamHandler->write(Array)
...
The interesting thing here is the "Permission denied". If I have a peak into the log directory, this is how it's looking like:
problems@failwhale:~/shop$ docker/sdk cli
--> DEVELOPMENT MODE
āāāāāā āāā āāāāā¬āā āāāāā
ā āāāā¼āāāā¬āā¬āā¬āā¬ā⤠āāā¬āāāā¬āā¬āā ā āā⤠ā āā āā
āāāā ā ā¼ ā āā⤠ā āāāā⤠ā¼ā⤠āāā ā āā⤠āāā¬ā āā
āāāāā⤠āā“āā āāā āāā“āā“āāāā“āā āāāāā“āāāā“āāāā
āāāā āāāāā
āā/data | Store: DE | Env: docker | Debug: (.) | Testing: (.)
ā°ā$ ls -la /var/log/spryker
total 12
drwxr-xr-x 2 1000 spryker 4096 Nov 4 21:22 .
drwxr-xr-x 1 root root 4096 Nov 4 21:19 ..
-rw-r--r-- 1 root root 1521 Nov 4 21:22 supervisord.log
This line is the interesting one:
drwxr-xr-x 2 1000 spryker 4096 Nov 4 21:22 .
To me, it's looking like the image gets built properly but some process `chown`s that folder in a hardcoded process or something of that magnitude.
Specs of what I'm testing with:
problems@failwhale:~/shop$ docker --version
Docker version 19.03.13, build 4484c46d9d
problems@failwhale:~/shop$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Any ideas?sparse-fall-78248
11/05/2020, 3:33 PMhigh-pencil-62400
11/05/2020, 3:41 PMsparse-fall-78248
11/06/2020, 7:20 AM/var/log/spryker is a volume in docker-compose. It seems it is inited with 1000 UID.How can I change this behaviour? Again, this means docker/sdk is broken for this use case where the user does not have UID 1000.
high-pencil-62400
11/06/2020, 7:48 AMsparse-fall-78248
11/06/2020, 10:58 AMhigh-pencil-62400
11/07/2020, 11:25 AMdocker logs spryker_yves_1 -f Using docker logs.
2. You can use dashboard service:
dashboard:
engine: dashboard
endpoints:
spryker.local:
There is a link to UI that shows logs from all containers.high-pencil-62400
11/07/2020, 11:25 AM