Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (16 sloc) 870 Bytes
title date draft author tags categories description
Keep Docker Running
2018-11-29 14:44:58 +0530
Sahil Ahuja
Commands to keep dockers running

Many we times we want dockers to keep running when started, either through docker-compose or kubernetes

The following are a few of the command we can use to achieve the same:

  1. sleep inf
  2. tail -F /dev/null

These commands need to run as the first thing that these dockers run. So they go as the entrypoint. Or if you want flexiblity you can add them as command, but ensure that the entrypoint know how to run these.

These can also be passed directly to the docker run command, and later you can start a bash terminal using docker exec (instead of starting bash/sh in docker run and the using docker attach)

You can’t perform that action at this time.