Merge pull request 'fix(entrypoint): exec memcached so docker stop is graceful' (#4) from fix/graceful-stop into trunk
Cloud MemCached Container / Build-and-Push (push) Successful in 1m1s
Cloud MemCached Container / Build-and-Push (push) Successful in 1m1s
This commit was merged in pull request #4.
This commit is contained in:
commit
0f46d8ad86
1 file changed
+5
-3
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
echo "Starting Memcached..."
|
||||
sleep 5
|
||||
/usr/bin/memcached -u memcached -l 0.0.0.0
|
||||
|
||||
exit 0
|
||||
# exec so memcached replaces bash as PID 1. bash as PID 1 has no SIGTERM
|
||||
# handler, so the kernel dropped `docker stop`'s SIGTERM and docker SIGKILLed
|
||||
# the container after the full 10s timeout (exit 137). memcached installs its
|
||||
# own SIGTERM/SIGINT handlers, so as PID 1 it shuts down immediately.
|
||||
exec /usr/bin/memcached -u memcached -l 0.0.0.0
|
||||
Reference in new issue
Block a user