Changes between Initial Version and Version 1 of Docker HowTo House Keeping


Ignore:
Timestamp:
09/29/16 16:49:30 (8 years ago)
Author:
saj.issa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docker HowTo House Keeping

    v1 v1  
     1To see what containers there are :
     2
     3    {{{sudo docker ps -a}}}
     4
     5    {{{sudo docker ps -l}}}
     6
     7To remove a container :
     8
     9    {{{sudo docker rm desperate_galileo}}}
     10
     11To remove all containers :
     12
     13    {{{sudo docker rm $(sudo docker ps -a -q)}}}
     14
     15To remove an image :
     16
     17    {{{sudo docker images}}}
     18
     19    {{{sudo docker rmi 7152fe63199f}}}
     20
     21To remove all images :
     22
     23    {{{sudo docker rmi $(sudo docker images -q)}}}
     24
     25To build a container :
     26
     27    {{{sudo docker build -t lcbruit/redcap:v1 .}}}
     28
     29    {{{sudo docker build --no-cache  -t lcbruit/redcap:v1 .}}}
     30
     31To run a container :
     32
     33    {{{sudo docker run -t -i lcbruit/redcap:v1 /bin/bash}}}
     34
     35    {{{sudo docker run -p 8080:80 -d lcbruit/redcap:v1}}}
     36
     37    {{{sudo docker run -i -t -p 8080:80 lcbruit/redcap:v1 /bin/bash}}}
     38
     39To tag an image :
     40
     41    {{{sudo docker tag 72d49f94ad66 lcbruit/redcap:devel}}}
     42
     43To view images :
     44
     45    {{{sudo docker images lcbruit/redcap}}}
     46
     47To stop a docker :
     48
     49    {{{sudo docker stop elated_bardeen}}}
     50
     51Docker logs :
     52
     53    {{{sudo docker logs condescending_perlman}}}
     54
     55Misc :
     56
     57    {{{sudo docker run -name redcap -i -t lcbruit/redcap:v1}}}
     58
     59    {{{sudo docker run -t -i ubuntu /bin/bash}}}
     60
     61Connect to existing container :
     62
     63    {{{sudo docker exec -i -t 4cd90347c851 /bin/bash}}}