2

I use Docker for a PHP project.. and he is grabbing my space every time I do a new build is seams that he is duplicate the images.

I tried to delete the images manual in the terminal with docker rm ... but the hdd space is already in use.

I can't finde the docker location on my osx.

Can you tell my where are all the files are stored and how can I delete it?

2 Answers2

3

As I mentioned in "How to remove old and unused Docker images", make sure you don"t keep dangling images after each docker build (intermediate images no longer used by your current image because of a changing Dockerfile):

docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

While the images are stored in /var/lib/docker/{driver-name} (inside the boot2docker or docker-machine VM used on a Mac mac), you wouldn't remove images manually from that path.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

To remove docker images, you should follow the steps bellow:

  • List docker images: docker images
  • Choose Image Ids you need to remove and type command: docker rmi IMAGE_ID. Make note that you have to stop the image before remove it
Nguyen Sy Thanh Son
  • 5,300
  • 1
  • 23
  • 33