> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanoss.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Docker

> Run scanoss-cli from a container, with no local Go install.

## Running a scan

Every release publishes multi-arch images for `linux/amd64` and `linux/arm64` to GitHub Container
Registry. Mount the code you want to scan and pass CLI arguments after the image name:

```bash theme={null}
docker run --rm -v "$PWD:/src" ghcr.io/scanoss/scanoss:latest \
  scan /src --api-key "$SCANOSS_API_KEY" > results.json
```

Use `:latest`, or pin a version in CI with a specific tag such as `:0.9.0`.

## Writing output into the mounted folder

The image runs as a non-root user, so writing output directly into the mounted folder (`--output
/src/results.json`) can fail with a permission error. Either redirect stdout on the host, as
above, or run the container as your own user so that you own the files it writes:

```bash theme={null}
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/src" \
  ghcr.io/scanoss/scanoss:latest scan /src --api-key "$SCANOSS_API_KEY" --output /src/results.json
```

## CI example

```yaml theme={null}
- name: SCANOSS scan
  run: |
    docker run --rm -v "$PWD:/src" ghcr.io/scanoss/scanoss:latest \
      scan /src --api-key "${{ secrets.SCANOSS_API_KEY }}" --output /src/results.json
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.