Get the App
SLTechnology News&Howtos  ›  Servers  › 

Some basic commands of docker

Shulou Source: shulou.com Published: 2022-06-03 03:12:44 10月05日 Update

Log in to the docker container

Docker exec-it 582be8927539 / bin/bash

Kill all containers in running statu

Docker kill $(docker ps-Q)

Delete all containers that have been stopped

Docker rm $(docker ps-a-Q)

Delete all mirrors in\ 'untagged/dangling\' () statu

Docker rmi $(docker images-Q-f dangling=true)

Delete all mirrors:

Docker rmi $(docker images-Q)

Save the modified docker image

Docker commit 582be8927539 mysql/mysql8:v1.0

Package an image

Docker tag zohar/testlink:latest mike/testlink:v1.0

Compress the mirror mike/testlink into a mike.tar file

Docker save-o / mnt/mike.tar mike/testlink

Long pass compressed image to images

Docker load-I / mnt/mike.tar

Tags: Mirror container status file login command Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi vpn OPPO Reno Shulou Technology Redmi