Search for remote image

search ubuntu  # will search for ubuntu distrib

Install & Run Linux distribution

docker pull debian  # will install debian
docker pull ubuntu:16.04
docker pull centos

List local Docker images

docker images

Run Docker image

docker run -i -t IMAGE /bin/bash
docker run -it ubuntu:trusty /bin/bash
docker run ubuntu:16.04

Remove Docker image (force deletion)

docker rmi -f IMAGE_ID

Modify a docker image

The example below shows how to install useful items on a standard ubuntu image, and then save the image locally.

# launch docker
docker pull ubuntu:16.04
docker run ubuntu:16.04
# inside image
apt-get update
apt-get install git-core, curl, bzip2
# launch another docker
# list current docker images
docker ps -a
# save container as new image
docker commit <container_id> your_name/ubuntu:16.04

Copy file into container

# list container
docker ps
# copy file
docker cp <file> <CONTAINER ID>:<PATH_DEST>/<file>

Examples of Docker builder: