Saturday, December 5, 2015

Docker notes

Useful links

Storage:
Dockerfile samples:

Commands

Download a pre-built image:

  docker pull centos

List local images:

  docker images

List running containers:

  docker ps

List all containers:

  docker ps -a

Remove all non running containers:

    docker rm $(docker ps -q -f status=exited)

Remove all containers:

    docker rm $(docker ps -a -q)

Remove all local images:

   docker rmi $(docker images -q)

Commit a local image:

  docker commit -m "Oracle JDK 8"  25e928f29d5e centos71-java8:v1

CentOS Service


  systemctl restart docker.service
  systemctl status docker.service

No comments:

Post a Comment