Reputation: 8846
My docker command has the following CMD
:
CMD ["npm", "start"]
Every week, my container must perform a command (preferably via cron
). After the command succeeds, I must restart the process that started via CMD
.
How would I restart the CMD
process from within a container in docker?
Upvotes: 1
Views: 60
Reputation: 6234
You can use docker exec <containername> npm restart
from your cron
Regards
Upvotes: 1