I wanted to run a PHP based service inside a container on my RB4011.
The image I found that is compatible and slim is:
https://github.com/erseco/alpine-php-webserver
There are couple issues that are preventing the container from operation.
The first is that it's tries to write into /dev/stderr and /dev/stdout.
To resolve this I have changed the default nginx.conf andwww.conf.
I assumed that like any other container I can use a file as a mount.
So the container is defined with:
Code:Select all
/container mounts add dst=/var/log/nginx name=php_log src=/disk1/php/log add dst=/var/www/html name=php_html src=/disk1/php/html add dst=/etc/nginx/nginx.conf name=php_nginx_conf src=/disk1/nginx.conf add dst=/etc/php81/php-fpm.d/www.conf name=php_fpm_www_conf src=/disk1/www.conf add dst=/tmp name=php_tmp src=/disk1/php/tmp /container add envlist=php_envs interface=veth3 mounts=php_log,php_html,php_nginx_conf,php_fpm_www_conf,php_tmp root-dir=disk1/php workdir=\ /var/www/html /container config set registry-url=https://registry-1.docker.io tmpdir=disk1/pull /container envs add key=TZ name=php_envs value=Asia/Jerusalem
(我想如何复制日志winbo的台词x??)Starting runit...
Started runsvdir, PID is 5
wait for processes to start....
mv: can't remove '/etc/nginx/nginx.conf': Resource busy
mv: can't remove '/etc/php81/php-fpm.d/www.conf': Resource busy
mv: can't remove '/etc/nginx/nginx.conf': Resource busy
mv: can't remove '/etc/php81/php-fpm.d/www.conf': Resource busy
... couple times
down: nginx: 1s, normally up, want up
down: php: 1s, normally up, want up
... and repeats
I am trying to understand if the only way to customize the container is using a tar file.
I assumed I can mount files the same as directories since it makes sense to me.
Is the only way to customize the container conf files is at creation time?
Is there a way to copy customized config files into the container?
Thanks,