Difference between revisions of "Docker goodies"

From BITPlan profiwiki Wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
* http://askubuntu.com/questions/505506/how-to-get-bash-or-ssh-into-a-running-container-in-background-mode
 
* http://askubuntu.com/questions/505506/how-to-get-bash-or-ssh-into-a-running-container-in-background-mode
 
* http://askubuntu.com/a/507009/129227
 
* http://askubuntu.com/a/507009/129227
 +
<source lang='bash'>
 +
docker exec -it $containername /bin/bash
 +
</source>
  
 
=== Remove untagged docker images ===
 
=== Remove untagged docker images ===

Revision as of 05:15, 23 October 2015

Attach to a running container

docker exec -it $containername /bin/bash

Remove untagged docker images

http://stackoverflow.com/a/28377696/1497139

docker rmi -f $(docker images -f "dangling=true" -q)

Support for build env variables

Upcoming feature in 1.9?