Skip to content
Advertisement

Gitlab-ci docker inside java image

To use a integration test library https://www.testcontainers.org/” I need a image with java a docker installed at same time.

I’m trying o use this stage:

JavaScript

But It does not work:

JavaScript

Any help?

Advertisement

Answer

The image gradle:jdk16 does not include the docker client. You’ll have to install it in your job. Additionally, you’ll need to use the service docker:dind in your services: configuration (not docker:latest)

JavaScript

Running this on gitlab.com runners, you should see an output like this:

job on gitlab.com

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement