Common commands used by docker to clean up useless images are summarized as follows:
请注意,在运行一下命令之前,请确保您不需要这些资源,并且所有数据都已经备份。
To clean up useless Docker images, you can run the following command:
docker image prune
This command will delete all images that are not used by any container. If you also want to delete untagged images, you can add the -a parameter after the command, as shown below:
docker image prune -a
In addition, you can also use the following command to display the Docker resources currently occupying disk space:
docker system df
This command will display Docker's disk usage and total resources. If you want to delete other resources such as containers, networks, and data volumes that are not in use, you can run the following command:
docker system prune
docker rapid deployment service
需要根据实际情况修改对应的路径
1、postgis
docker run -t --name postgresql --restart always -e POSTGRES_USER='postgres' -e POSTGRES_PASSWORD=abc123 -e ALLOW_IP_RANGE=0.0.0.0/0 -p 50006:5432 -v /opt/postgres_data/data:/var/lib/postgresql/data -d kartoza/postgis
2、nexus
docker run -d -p 8081:8081 -p 8082:8082 -p 8083:8083 --name nexus -v /nexus/data:/nexus-data --restart unless-stopped sonatype/nexus3
3、nginx
docker run --name nginx --net host -v /nginx/conf.d:/etc/nginx/conf.d -v /nginx/nginx.conf:/etc/nginx/nginx.conf -v /nginx/html:/usr/share/nginx/html -v /nginx/log:/var/log/nginx -d nginx