You are not logged in.

#1 2025-05-30 14:54:20

FishBoneEK
Member
Registered: 2023-09-26
Posts: 60

[SOLVED] Docker: Use external drive to build large images?

I'm trying to build an image, but during the process it will take at least 20GB space, and I don't have that much on my disk. The final image is not that large though, estimated size is 1~2G.

I have an external drive which has sufficient size for the build process, and I know I can set the docker root in docker config file.

But I wonder if there's a way to use external drive as temporary dir to store the large pile of stuff generated in the build process instead of moving the whole docker root?

Thanks!

Last edited by FishBoneEK (2025-06-06 06:43:18)

Offline

#2 2025-05-31 12:40:40

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,870

Re: [SOLVED] Docker: Use external drive to build large images?

dockerd supports DOCKER_TMPDIR which may solve that issue.
see https://docs.docker.com/reference/cli/d … us-options


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2025-06-06 06:42:56

FishBoneEK
Member
Registered: 2023-09-26
Posts: 60

Re: [SOLVED] Docker: Use external drive to build large images?

Lone_Wolf wrote:

dockerd supports DOCKER_TMPDIR which may solve that issue.
see https://docs.docker.com/reference/cli/d … us-options

Thanks!

Offline

Board footer

Powered by FluxBB