Closed zikolach closed 7 years ago
Using FROM hypriot/rpi-node. After executing docker stop on running container SIGTERM handler are not called.
FROM hypriot/rpi-node
docker stop
SIGTERM
process.on('SIGTERM', function () { console.log('Exiting'); });
Dockerfile looks like:
FROM hypriot/rpi-node ADD package.json /src/ WORKDIR /src RUN npm i ADD main.js /src/ CMD node main.js
After changing CMD to ENTRYPOINT it works for docker stop, but not for Ctrl+C when running container with -it flags.
CMD
ENTRYPOINT
Ctrl+C
-it
Using
FROM hypriot/rpi-node
. After executingdocker stop
on running containerSIGTERM
handler are not called.Dockerfile looks like:
After changing
CMD
toENTRYPOINT
it works fordocker stop
, but not forCtrl+C
when running container with-it
flags.