Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 520 Bytes

2018-08-24-Signal_in_Dockerfile.md

File metadata and controls

24 lines (14 loc) · 520 Bytes
title date tags key
How to Write Dockerfile to Support Graceful Shutdown
2018-08-15 16:18:32 +0800
Report Progress Objective
2018-08-15-WeeklyReport

exec

docker run image_name /bin/bash -c "mvn" can propagate SIGTERM signal

vs.

docker run image_name /bin/bash -c "echo abc;mvn" it will not be propagated to mvn

docker run image_name /bin/bash -c "echo abc;exec mvn" can solve this issue.

docker run image_name /bin/bash -c "echo abc&&mvn" can propagate SIGTERM signal

fork exec ?

trap : tldp.org