Is Docker.raw necessary or can be erased?
Asked Answered
S

2

6

Problem

I decided to learn Docker and followed the official installation guide, specifically for ubuntu.

After downloading some images and making some containers to test how everything works, using CLI and Desktop App, found that my system ran out of memory.

Find out that a file called "Docker.raw" was created and consume 8.4GB of memory. The thing it's that I don't know for what is that file.

Disk Analysis Image

I have my disk space limit setted to 8GB, so don't understand the overlow:

Docker Configuration Image

Find out 2 things:

  1. It's a common problem, on multiple systems.

  2. Everybody recommend this command:

docker system prune -a --volumes

What I tried

I tried executing the command above, since it's the general answer for this problem, but doesn't work at all:

$ docker system prune -a --volumes
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all volumes not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B

Doesn't free any space.

What I'm searching, if anyone can help

  1. A confirmation that I can erase Docker.raw or not, since I don't find a clear answer if it's necesary for docker to work.

  2. An alternative to clear the space, because the common solution didn't work.

Aditional Information

  1. OS: Ubuntu 22.04.2 LTS
  2. Docker: vr. 24.0.1, build 6802122
  3. Docker Compose: vr. 2.17.3
  4. Disk Size: 128GB
  5. Yes, my disk it's filled with many things and always fight with space, that's why I have problems with this new disk-space-eater and want to erase it.
Shading answered 21/5, 2023 at 1:51 Comment(4)
Did you work this out? I'm hitting the same issue.Whitehurst
@Whitehurst did any of you?Herrle
@LeeSkies - Sorry, I can't remember. I don't seem to have that file now though. I would have reset my Docker installation many times since my initial comment above.Whitehurst
@Whitehurst figured, I ended up deleting it anyway and it doesn't seem to have an impactHerrle
F
1

Docker.raw file is necessary for the "Docker Desktop" application. Docker Desktop stores Linux containers and images in a single, large "disk image" file in the Linux filesystem. This is different from Docker on Linux, which usually stores containers and images in the /var/lib/docker directory on the host's filesystem.

If you don't care about your images and containers, you can erase Docker.raw file. But it is better to uninstall "Docker desktop" with a complete cleanup. Docker will continue working anyway.

I suggest checking the "docker context" to understand the situation better:

docker context  ls
docker context use default
docker images
docker context use desktop-linux
docker images

To clear the space you can uninstall "Docker Desktop" and use lazydocker in the "default" docker context as an alternative.

Fredrick answered 21/7, 2024 at 21:12 Comment(0)
T
0

I deleted "Docker.raw" and it doesn't seem to have an impact.

Tape answered 1/4, 2024 at 12:14 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.