# Invoking via Docker

If you want to run docker explicitly you can, of course, do that as well. The basic way to run the container is this one:

```
    PWD=your-project-folder
    docker run -it --rm \
              --volume ${PWD}:/workspace \
              --env METERIAN_API_TOKEN=your-token-here \
              meterian/cli [Meterian CLI Options]
```

Please note that in this situation the local caches used by the tools will not be bound. We suggest you bind those folders, and the easiest way to do that is to use the provided [meterian-docker](https://github.com/MeterianHQ/meterian-scanner-docker/blob/master/scripts) script.

However, if you feel adventurous, you can of course do it yourself. For example, to bind the java caches in a maven build:

```
    PWD=your-project-folder
    docker run -it --rm \
              --volume ${PWD}:/workspace \
              --env METERIAN_API_TOKEN=your-token-here \
              --mount type=bind,source=${HOME}/.m2,target=/home/meterian/.m2 \
              meterian/cli [Meterian CLI Options]
```

In some cases (i.e dotnet) you will need to specify the `UID` and the `GID` in order for the system to work, reaching something like this:

```
    PWD=your-project-folder
    HOST_UID=`id -u`
    HOST_GID=`id -g`
    docker run -it --rm \
              --volume ${PWD}:/workspace \
              --env METERIAN_API_TOKEN=your-token-here \
              --mount type=bind,source=${HOME}/.dotnet,target=/home/meterian/.dotnet \
              --mount type=bind,source=${HOME}/.nuget,target=/home/meterian/.nuget \
              --env HOST_UID=${HOST_UID} \
              --env HOST_UID=${HOST_GID} \
              meterian/cli [Meterian CLI Options]
```

The script is run by the `meterian` user in the container, with their home at `/home/meterian`. You can see how this works in the source of the [meterian-docker](https://github.com/MeterianHQ/meterian-scanner-docker/blob/master/scripts/meterian-docker) script. Please get in touch if you have any issue using the [support channels](mailto:support@meterian.com).


---

# Agent Instructions: 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:

```
GET https://docs.meterian.io/the-client/the-meterian-client-dockerized/advanced-usage/invoking-via-docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
