containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
5k stars 477 forks source link

I have a apache image that writes it's logs to tty, but it fails without --group-add tty #82

Open Richard87 opened 4 years ago

Richard87 commented 4 years ago

How can I modify my docker-compose-file or image so that it works as easily as possible?

https://github.com/containers/libpod/issues/4490

Richard87 commented 4 years ago

upstream podman has been fixed, and works, but I can still not run it via podman-compose...

The podman command executed:

podman run --name=eportal_eportal_1 -d --pod=eportal --label io.podman.compose.config-hash=123 --label io.podman.compose.project=eportal --label io.podman.compose.version=0.0.1 --label com.docker.compose.container-number=1 --label com.docker.compose.service=eportal -e REDIS_URL=redis://redis -e DATABASE_URL=mysql://mysql:3306/eportal_dev -e MAILER_URL=smtp://test:test@mailhog:1025 -e COMPOSER_HOME=/tmp -e MERCURE_PUBLISH_URL=http://localhost:8088/hub -e MERCURE_INTERNAL_URL=http://mercure/hub --env-file /home/.../.env --mount type=bind,source=/home/.../.,destination=/var/www --add-host mailhog:127.0.0.1 --add-host eportal_mailhog_1:127.0.0.1 --add-host eportal:127.0.0.1 --add-host eportal_eportal_1:127.0.0.1 --add-host redis:127.0.0.1 --add-host eportal_redis_1:127.0.0.1 --add-host mysql:127.0.0.1 --add-host eportal_mysql_1:127.0.0.1 --add-host mercure:127.0.0.1 --add-host eportal_mercure_1:127.0.0.1 richard87/php-base:7.4rc5

Podman works:

Projects/skil/eportal on  master ➜ podman run --rm -it -p 8888:8000 richard87/php-base:v7.3.5 apache2-foreground
AH00112: Warning: DocumentRoot [/var/www/public] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
AH00112: Warning: DocumentRoot [/var/www/public] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
[Sun Nov 24 16:19:57.980550 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.3.5 configured -- resuming normal operations
[Sun Nov 24 16:19:57.980583 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
10.0.2.2 - - [24/Nov/2019:16:20:03 +0100] "GET / HTTP/1.1" 404 492 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0"
10.0.2.2 - - [24/Nov/2019:16:20:03 +0100] "GET /favicon.ico HTTP/1.1" 404 502 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0"
^C[Sun Nov 24 16:20:12.703793 2019] [mpm_prefork:notice] [pid 1] AH00169: caught SIGTERM, shutting down

Podman-compose fails:

Projects/skil/eportal on  master ➜ podman logs -f eportal_eportal_1                                           
AH00557: apache2: apr_sockaddr_info_get() failed for 1ea20dea64da
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00091: apache2: could not open error log file /var/log/apache2/error.log.
AH00015: Unable to open logs
AH00557: apache2: apr_sockaddr_info_get() failed for 1ea20dea64da
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00091: apache2: could not open error log file /var/log/apache2/error.log.
AH00015: Unable to open logs
Richard87 commented 4 years ago

Ps, I'm running version:

Projects/skil/eportal on  master ➜ podman-compose version
podman-composer version  0.1.6dev
podman --version
podman version 1.6.2
0

Projects/skil/eportal on  master ➜ crun --version
crun version 0.10.6
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL

Projects/skil/eportal on  master ➜ runc --version
runc version 1.0.0-rc8+dev
commit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
spec: 1.0.1-dev

Projects/skil/eportal on  master ➜