#docker (2018-08)
All things docker
Archive: https://archive.sweetops.com/docker/
2018-08-02

@Erik Osterman (Cloud Posse) has joined the channel

set the channel description: All things docker

@Andriy Knysh (Cloud Posse) has joined the channel

@maarten has joined the channel

@krogebry has joined the channel

So for everyone who is dealing with docker signalling issues, I had some pain with it today with sidekiq not stopping gracefully inside docker. Docker stop sends a SIGTERM to docker pid. In most cases, with /bin/sh -c being the entrypoint, the SIGTERM will only reach the pid of /bin/sh and not the child processes of it. Inside my bash script I was already using exec, but I had to use exec in the CMD line of the Dockerfile to make it to work.
Note the exec.
CMD exec /$APP_DIR/bin/dispatch.sh
And note the exec Inside dispatch.sh
SIDEKIQ_COUNT=3 SIDEKIQ_MAXMEM_MB=2000 SIDEKIQ_PRELOAD=sidekiq_swarm exec sidekiqswarm -t 25 -C config/sidekiq.yml
https://hochzehn.com/insights/docker-stopping-containers-softly.html

Aha… so basically, it’s running /bin/sh -c 'exec /$APP_DIR/bin/dispatch.sh'
, which then replaces PID1
with dispatch.sh
I’ve also run into problems with signal handling and shell scripts with docker.

@tamsky has joined the channel

it feels like the format of shell commands can convey a lot of meaning:
SIDEKIQ_COUNT=3 SIDEKIQ_MAXMEM_MB=2000 SIDEKIQ_PRELOAD=sidekiq_swarm &&
exec sidekiqswarm \
-t 25 \
-C config/sidekiq.yml

it’s running /bin/sh ...
does CMD (and hence RUN) always pick /bin/sh, or does it use the named shebang #!
shell at the top of:/$APP_DIR/bin/dispatch.sh
?
2018-08-05

@jylee has joined the channel
2018-08-17

@Igor Rodionov would this be nice for our local dev harness stuff? https://github.com/bcicen/ctop
ctop - Top-like interface for container metrics

@Igor Rodionov has joined the channel
2018-08-22

@melynda.hunter has joined the channel
2018-08-24

@Ruan Arcega has joined the channel
2018-08-27

@tolstikov has joined the channel

@loweryr has joined the channel
2018-08-28

@justin.dynamicd has joined the channel

@Arkadiy has joined the channel
2018-08-29

@Raghu has joined the channel