Unix Container: Difference between revisions

From Objectif Client Inc
Jump to navigation Jump to search
Line 22: Line 22:
* Stop
* Stop
<pre>docker stop "containerId or Name"</pre>
<pre>docker stop "containerId or Name"</pre>
* Start
* Start (Batch)
<pre>docker start "containerId or Name"</pre>
<pre>docker start "containerId or Name"</pre>
* Start (and login in)
<pre>docker start -i "containerId or Name"</pre>


===Remove a container===
===Remove a container===

Revision as of 16:44, 29 March 2015

Container Howto

Install and run a container

docker run -i -t ubuntu:14:04 /bin/bash

Create an image from a container Commit

"b5673dbced61" is an image id

docker commit -m "Ubuntu 14.10 Demonstrator" -a "Author Name" b5673dbced61 demo:14.10

List Images (Source to initiare a containers)

docker images

Remove an image "b5673dbced61" is an image id

docker rmi b5673dbced61 

List containers (Running Virtual Machines)

  • Running:
 docker ps
  • Full List
 docker ps -a

Start and Stop a container

  • Stop
docker stop "containerId or Name"
  • Start (Batch)
docker start "containerId or Name"
  • Start (and login in)
docker start -i "containerId or Name"

Remove a container

"d0955f21bf24" is a container Id

docker rm d0955f21bf24

Remove all containers

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

Execute more advances

docker run -i -t --net="bridge" --name Demo -v /opt/docker/data mindesktop:v01.01