docker

Docker basic commands

docker run [-d runs on background deamon, -p expose_port:docker_port , –name ]
docker start
docker stop
docker ps [-a include stopped containers]
docker rm
docker build -t
docker push

Examples:

docker run -p 2181:2181 -p 9092:9092 –env ADVERTISED_HOST=localhost –env ADVERTISED_PORT=9092 spotify/kafka
docker start kafka
docker stop kafka
docker rm kafka
docker build -t vlknbcr/test . #. represents I am in the folder where docker file it is.
docker push vlknbcr/test

Advertisements