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

QuarkusIntegrationTest docker run, does not pull the image #357

Closed
snowdrop-bot opened this issue Jun 7, 2021 · 0 comments
Closed

QuarkusIntegrationTest docker run, does not pull the image #357

snowdrop-bot opened this issue Jun 7, 2021 · 0 comments
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@snowdrop-bot
Copy link
Collaborator

In our CI-build the docker image is pushed to nexus using jib, the integration-test is then run on a docker daemon. The first time it will correctly pull the image (which sometimes causes a timeout, because it is not within the 10 seconds wait period:

https://github.com/quarkusio/quarkus/blob/11607b626f070f5ed92617e3273322b30de6822d/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java#L68

The second time (and all tries after that), it will reuse the docker image inside the docker daemon!

Basically, it should pull the image first and after that run the image. I know there is an option called --pull=always on run, but that doesn't work on older docker daemons.

So basically something like:

List<String> args = new ArrayList<>();
args.add("docker");
args.add("pull");
args.add(containerImage);
ProcessBuilder(args).redirectError(logFile.toFile()).redirectOutput(logFile.toFile()).start().waitFor();

Before the actual docker run here:
https://github.com/quarkusio/quarkus/blob/11607b626f070f5ed92617e3273322b30de6822d/test-framework/common/src/main/java/io/quarkus/test/common/DockerContainerLauncher.java#L71-L73

This will also fix the timeout if the pull on the first run takes to long.


quarkusio#17730


$upstream:17730$

@snowdrop-bot snowdrop-bot added the upstream/closed The issue has been closed in the upstream repository label Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

2 participants