- Mac: ๐ https://docs.docker.com/installation/mac/
- Ubuntu: ๐ง curl -sSL https://get.docker.com/ubuntu/ | sudo sh
- Linux: wget -qO- https://get.docker.com/ | sudo sh
- CentOS: ๐ฆ
> unset ${!DOCKER*}
Start/Stop docker service: service docker start/stop ⏯️
Build image: docker build -t="test:latest" . ๐️
List images: docker images ๐ผ️
Run a command in a new container: ๐
- docker run -it -p 8888:8080 -d test:latest
List containers: docker ps ๐
Connect to running docker container: docker exec -i -t "IMAGE ID" /bin/bash
Stop containers: docker stop $(docker ps -a -q) ๐
Remove containers: docker rm $(docker ps -a -q) ๐งผ
Removing all unused docker images: docker images -q |xargs docker rmi ♻️Docker hub commands: ๐
Push docker image:
- docker tag 515ba39974ef test/icadl:version1
- docker push test/icadl ๐ค
- docker-machine ip
ๆฒๆ็่จ:
ๅผต่ฒผ็่จ