Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"portage" image produce huge I/O every time #40

Closed
anonymous09 opened this issue Mar 12, 2017 · 4 comments
Closed

"portage" image produce huge I/O every time #40

anonymous09 opened this issue Mar 12, 2017 · 4 comments

Comments

@anonymous09
Copy link

Good day. I am using Gentoo images in Continuous Integration (Gitlab CI). I run docker via commands:

docker create -v /usr/portage --name portage gentoo/portage
docker run --volumes-from portage --name gentoo gentoo/stage3-amd64 -c "foo bar"

And every time first command produce huge I/O because all content from /usr/portage copying from image to container "portage".
How I can prevent it?

Can you create image without "VOLUME /usr/portage" keyword?

@simonvanderveldt
Copy link

@anonymous09 There's not a whole lot you can do. Docker is basically extracting the volume image at that point. That obviously needs to happen, so afaik there's nothing you can do about it.

@oxr463
Copy link

oxr463 commented May 11, 2020

See also: presslabs/gitfs#319, presslabs/gitfs#305

@ajakk
Copy link
Member

ajakk commented Jun 29, 2023

Yeah, not much we can do as the Docker downstream, unless we see a good replacement for the way we currently recommend using the repository. Users might try fiddling with different storage backends or see if podman can handle things any better.

@ajakk ajakk closed this as completed Jun 29, 2023
@tianon
Copy link

tianon commented Jun 29, 2023

Oh, I think BuildKit's ability to mount content directly from another image might be useful here?

# syntax=docker/dockerfile:1
FROM gentoo/stage3
RUN --mount=type=bind,from=gentoo/portage,source=/var/db/repos/gentoo,target=/var/db/repos/gentoo \
        emerge app-misc/hello
CMD ["hello"]

(Then built with docker buildx build)

KSmanis added a commit to KSmanis/docker-gentoo-distcc that referenced this issue Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants