docker-debian icon indicating copy to clipboard operation
docker-debian copied to clipboard

how to use s6

Open cfoellmann opened this issue 8 months ago • 2 comments

hi @tiredofit

I am trying to move this https://github.com/olbat/dockerfiles/blob/master/cupsd/Dockerfile.stable to your docker.io/tiredofit/debian:bookworm` base.

I thought it to be very straight forward but https://github.com/wus-technik/docker-printserver does not start the cupsd. Can you have a look at my run and structure? Should be an easy fix for you.

this is the cycle of unsuccessful start attempts:

+ set +x
2025-04-30.11:51:06 [DEBUG] /etc/services.available/10-cupsd/run ** [cupsd] [process_restart] - Sleeping for 1 seconds
+ '[' 50 -gt 1 ']'
+ sleep 1
+ '[' true = true ']'
+ '[' '' = false ']'
++ log_prefix
++ output_off
++ '[' true = true ']'
++ set +x
++ basename ./run
+ echo -e '2025-04-30.11:51:07 \e[42m[STARTING]\e[49m /etc/services.available/10-cupsd/run ** [cupsd] [50] Starting cupsd'
2025-04-30.11:51:07 [STARTING] /etc/services.available/10-cupsd/run ** [cupsd] [50] Starting cupsd
++ log_prefix
++ output_off
++ '[' true = true ']'
++ set +x
++ basename ./run
+ echo -e '2025-04-30.11:51:07 [STARTING] /etc/services.available/10-cupsd/run ** [cupsd] [50] Starting cupsd'
+ output_on
+ '[' true = true ']'
+ case "$(basename "$0")" in
++ basename ./run
+ case "$PWD" in
+ set -x
+ exec /usr/sbin/cupsd -f
+ PROCESS_NAME=cupsd
+ check_container_initialized
+ print_debug 'Checking to see if container initialization scripts have completed'
+ output_off
+ '[' true = true ']'
+ set +x
2025-04-30.11:51:08 [DEBUG] /etc/services.available/10-cupsd/run ** [cupsd] Checking to see if container initialization scripts have completed
+ output_off
+ '[' true = true ']'
+ set +x
+ liftoff
+ output_off
+ '[' true = true ']'
+ set +x
+ print_start 'Starting cupsd'
+ output_off
+ '[' true = true ']'
+ set +x
2025-04-30.11:51:08 [ERROR] /etc/services.available/10-cupsd/run ** [cupsd] POTENTIAL RUNWAY DETECTECTED: Disabling 10-cupsd service because it has tried restarting '50' times
++ basename /etc/services.available/10-cupsd
+ s6-svc -d /var/run/s6/legacy-services/10-cupsd

cfoellmann avatar Apr 30 '25 10:04 cfoellmann

Interesting, looking at present state of repository it looks fine to me. Although I can't see for sure if the cupsd process is running.

Also, what happens if you run that exact command (minus exec) while inside the container? That may give some hints..

tiredofit avatar May 01 '25 15:05 tiredofit

I did solve it just before I wanted to post THIS:

I have this in top 1282 root 20 0 220 76 56 S 0.0 0.0 0:00.05 s6-supervise 10-cupsd

but while the container starts this is popping up

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   3791 root      20   0    4852   3920   2708 S   1.0   0.0   0:00.03 bash ./run 10-cupsd

BUT:

I removed the mapping of the cups folders in my docker compose and it starts up. I will have a look at that one now. But for testing and dev this is great!!

Again thanks for the great base and you reply just pushed me into the right thinking :-)

cfoellmann avatar May 02 '25 13:05 cfoellmann