> For the complete documentation index, see [llms.txt](https://docs.meterian.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meterian.io/ci-server-integrations/gitlabcicd/sample-java-project.md).

# Docker-in-Docker configuration

The Docker-in-Docker pipeline configuration allows you to use the [Meterian Dockerized Client](/the-client/the-meterian-client-dockerized.md) directly in your pipeline. The key advantage of this configuration is that you do not have to worry about installing the supporting tooling that would be used to perform a scan on your project beforehand as it is already provided in our Docker image.

The example below uses a very specific tag `latest-java`. This Meterian Dockerized Client tag ensures that a variant which only includes the tooling to support Java scans (the java runtime, Maven, Gradle, Ant) is employed for the analysis. This ensures that build times are reduced as language-specific variants images are considerably lighter than the main (`latest`) image that contains all the tooling for the languages we support.

```
meterian-analysis:
 image: docker:latest
 
 services:
   - docker:dind
 
 stage: test
 
 script:
   - ROOT=`pwd`
   - METERIAN_IMAGE=meterian/cli:latest-java
   - docker pull --quiet $METERIAN_IMAGE
   - METERIAN_CLI_OPT="--report-console"
   - docker run --rm --volume $ROOT:/workspace --env METERIAN_API_TOKEN=$METERIAN_API_TOKEN $METERIAN_IMAGE $METERIAN_CLI_OPT

```

You can also pin a specific version of the image, like docker:20.10.16. If you use a tag like docker:latest, you may have no control over which version is used, and in certain situations this can cause incompatibility problems when new versions are released.

```
meterian-analysis:
  image: docker:20.10.16

  services:
    - docker:20.10.16-dind

  stage: test
 
 script:
   - ROOT=`pwd`
   - METERIAN_IMAGE=meterian/cli:latest-java
   - docker pull --quiet $METERIAN_IMAGE
   - METERIAN_CLI_OPT="--report-console"
   - docker run --rm --volume $ROOT:/workspace --env METERIAN_API_TOKEN=$METERIAN_API_TOKEN $METERIAN_IMAGE $METERIAN_CLI_OPT

```

A live example can be found in this[ sample project based on Java](https://gitlab.com/MeterianHQ/sample-java-spring) hosted on GitLab.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.meterian.io/ci-server-integrations/gitlabcicd/sample-java-project.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
