Reputation: 6185
Caveat: I'm new to Docker user
I pulled a docker image to my machine:
sudo docker pull docker.local:5000/rhel7/24_GB_docker_image
This image is 24GB in size, and I'd like to delete it from my machine, without deleting it from docker.local machine.
Are there documents/URLs that would point me in the correct direction to achieve the above?
Upvotes: 0
Views: 47
Reputation: 1137
To clean up not used images, containers, etc. you can use the docker system prune
command.Itwill ask you what you want to delete.
Upvotes: 1
Reputation: 17433
Use docker rmi
. It deletes a local image (see https://docs.docker.com/engine/reference/commandline/rmi)
# find the image ID
docker images --filter reference=docker.local:5000/rhel7/24_GB_docker_image
# delete image
docker rmi <image ID>
Upvotes: 3