docker

Finally I got some chances to package one application using docker, here are some useful commands

docker images:

docker build –rm -t my_tag docker_dir ( with Dockerfile)

docker images , docker rmi ( remove docker image)

docker containers

docker run -d –publish 9080:80 –publish 1022:22 –name container_name –restart always –voloume host_dir:container_dir -e HOST_UID=$(id -u) $tag “$@”

docker ps -a, docker rm  ( remove docker containers)

docker useful commands

docker ps

docker -exec -it continer-id bash ( to enter into above docker app)

docker cleanup

docker ps -a |xargs docker rm
docker images -q |xargs docker rmi

docker backup/restore

docker commit

docker login    ( my login: comrite )

docker push  ( to hub.docker. https://hub.docker.com/ )

docker export container_id  > export.tar  ( docker import)

docker save  image_id > save.tar  ( docker load )

 

 

A good book about docker at:

Docker for Dummies in real world ( amazon)

Docker for Dummies in real world ( B&N )

 

Please rate this


Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>