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

Dev Services with a remote Docker environment #18494

Closed
philschaller opened this issue Jul 7, 2021 · 5 comments · Fixed by #18505
Closed

Dev Services with a remote Docker environment #18494

philschaller opened this issue Jul 7, 2021 · 5 comments · Fixed by #18505
Labels
Milestone

Comments

@philschaller
Copy link

Description

Since Quarkus 2.0.0.Alpha2 (#16904) Dev Services are restricted to local Docker environments. Any existing remote environments are ignored. Our build system relies on such a remote Docker environment (GitLab Runner with k8s and DinD).

Workaround

Use an explicit test container with QuarkusTestResourceLifecycleManager and disable Dev Services with quarkus.datasource.devservices=true.

Implementation ideas

In addition to the local check also evaluate DOCKER_HOST and probably also DOCKER_TLS_VERIFY, DOCKER_CERT_PATH.

@philschaller philschaller added the kind/enhancement New feature or request label Jul 7, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 7, 2021

/cc @stuartwdouglas

@stuartwdouglas
Copy link
Member

Did this used to work? I don't think we changed anything in particular here.

@stuartwdouglas
Copy link
Member

Ah, never mind, just saw the linked issue.

@stuartwdouglas
Copy link
Member

@philschaller any chance you could build the linked PR and see if it fixes your issue? I don't have a remote docker env to test.

@philschaller
Copy link
Author

@stuartwdouglas Thanks for the quick fix! It works as expected.
To test it locally you can use the following DinD setup. Insecure, but it works for a quick test:

docker container run -i -t --rm --net test-net --privileged --name dind --env DOCKER_TLS_CERTDIR="" docker:20.10.7-dind
docker container run -i -t --rm --net test-net --mount type=bind,source=$HOME/.m2,destination=/root/.m2 --mount type=bind,source=$(pwd),destination=/opt/project --mount type=bind,source=$HOME/.docker,destination=/root/.docker --workdir=/opt/project --env DOCKER_TLS_VERIFY=0 --env DOCKER_HOST="tcp://dind:2375" maven:3.8.1-openjdk-11 bash

@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants