Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Deploying docker containers

Farshid Tavakolizadeh edited this page Feb 22, 2020 · 7 revisions

The best way to run docker container using the Deployment Tool is as follows:

Install

Make sure the container name is not taken, then create the container with appropriate configuration such as a name. Example:

docker rm -f container_name; docker create --name container_name image_name

Run

Start the container in attached mode (foreground)

exec docker start -a container_name

The exec command is to replace the shell process by the container process so that the interrupt signal is propagated to it when trying to stop the container. Without that, the shell (used internally) will create a subprocess and won't forward the signal to it as expected.