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

Images built by ImageFromDockerfile are always deleted by ryuk #4702

Closed
Mahoney opened this issue Nov 26, 2021 · 2 comments
Closed

Images built by ImageFromDockerfile are always deleted by ryuk #4702

Mahoney opened this issue Nov 26, 2021 · 2 comments
Labels

Comments

@Mahoney
Copy link

Mahoney commented Nov 26, 2021

despite setting deleteOnExit = false.

Because ImageFromDockerfile.resolve does a labels.putAll(DockerClientFactory.DEFAULT_LABELS) the ryuk container will delete the image despite calling it as so:

GenericContainer container = new GenericContainer(
      new ImageFromDockerfile(
        "my-name", // dockerImageName
        false      // deleteOnExit
      ).withDockerfile(Paths.get("./my.dockerfile"))
    );
container.start()

As it also prunes, this means all the created layers are discarded so no layer caching on subsequent builds.

@loic-seguin
Copy link

Hi everyone, is there anything ongoing to solve this problem ?

@kiview
Copy link
Member

kiview commented Jun 22, 2022

Fixed by #5391.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants