Skip to content

Docker Image

Michael Scovetta edited this page Oct 6, 2022 · 3 revisions

If you don't have the development environment configured or you want to run OSSGadget without additional overhead, you can use Docker. This repository contains a "Dockerfile" which allows us to build an image and use that to run a container with the latest code.

# Clone repository
$> git clone https://github.com/microsoft/OSSGadget.git
$> cd OSSGadget

# Build OSSGadget and create a docker image
$> docker build -t ossgadget .

# Run container
$> docker run -it --rm ossgadget /bin/bash

# Inside container - run oss-download binary
root@container:/app/src# oss-download <args>

For certain tools, like OSS Health, you can set the GITHUB_ACCESS_TOKEN environment variable when you create the container, like:

$> docker run --rm -it -e GITHUB_ACCESS_TOKEN=abcdefg --entrypoint /usr/bin/oss-health ossgadget pkg:npm/left-pad@1.3.0
Clone this wiki locally