Guangning Yu's Blog
Home
Code
Data
Setup
Industry
MachineLearning
Archive
Docker Basics
2019-02-20 22:04:31
|
Docker
# Images ``` docker images docker build -t image_name . docker rmi $(docker images | grep "^<none>" | awk "{print $3}") # remove all untagged images docker save image_name > image_name.tar # save image as a tar file docker load < busybox.tar.gz # load image ``` # Containers ``` docker run -p 27017:27017 -v mongodbdata:/data/db mongo docker ps -a docker exec -it ubuntu_bash bash docker rm container_name docker rm $(docker ps -a -q) # remove all stopped containers ``` # Volumes ``` docker volume create mongodbdata docker volume ls docker volume inspect mongodbdata ``` # Networks ``` docker network ls docker network create network_name docker network inspect network_name docker network rm network_name ``` # Azure Container Instance ``` docker login azure --tenant-id 8432da0f-f8af-4b02-b318-4c777cfab498 docker context create aci hpjacicontext docker context use hpjacicontext docker compose up ``` # Docker compose ``` docker-compose up --detach --force-recreate ```
Previous:
Create Free SSL/TLS Certificates using Certbot
Next:
Webpack4 Setup