Tuesday 4 June 2019

Docker : Run the container in detached mode


By default container run in foreground mode, if you want to run the container in detached mode, use -d option.

Syntax
docker run -d {image}

$docker run -d --name myWebApplication jboss/wildfly
26fafd002b7ef1518db3c40f9613a98695560c70d546e529c7a59900ebe8d3be
$
$docker container ls
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
26fafd002b7e        jboss/wildfly       "/opt/jboss/wildfly/…"   5 seconds ago       Up 4 seconds        8080/tcp            myWebApplication



Previous                                                 Next                                                 Home

No comments:

Post a Comment