Posts

Showing posts from October, 2018

[Docker] Cli you cannot live without

docker ps  —  Lists running containers . Useful flags: -a / -all for all containers (default shows just running) —-quiet /-q to list just their ids (useful for when you want to get all the containers).  docker pull  — Most of your images will be created on top of a base image from the Docker Hub registry. Docker Hub contains many pre-built images that you can pull and try without needing to define and configure your own. To download a particular image , or set of images (i.e., a repository), use docker pull. docker build  — The docker build command builds Docker images from a Dockerfile and a “context”. A build’s context is the set of files located in the specified PATH or URL. Use the -t flag to label the image, for example docker build -t my_container . with the . at the end signalling to build using the currently directory. docker run  —  Run a docker container based on an image , you can follow this on with other commands, such as -it bash to then run bash from with