Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Running SourceClear via Docker

License

NotificationsYou must be signed in to change notification settings

srcclr/agent-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Why?

The SourceClear agent isnatively packaged for most platforms but isn't supported on some, e.g. the musl-based Alpine. This provides a way to run it on any platform with Docker support.

Getting started

Build an image containing the agent:

docker build. -t srcclr/agent

Perform a scan:

export SRCCLR_API_TOKEN=token./srcclr scan --url https://github.com/srcclr/example-ruby --quick

This scans the given repository within a container and cleans everything up when done.

Building your projects

For accurate results, the agent scans projects by building them and observing the dependencies resolved by their package managers. Full scans therefore require build-time dependencies, such as external programs and system libraries, to be present in the container.

An easy way to accomplish this is to extend the image built earlier with a second Dockerfile:

FROM srcclr/agentRUN apt-get update -y && apt-get install -y maven
docker build. -f Dockerfile-maven -t srcclr/agent-maven

With that done, full scans will work.

IMAGE=srcclr/agent-maven ./srcclr scan --url https://github.com/srcclr/example-java-maven

To speed up builds, it may be useful to mount system-wide cache directories. This may be done using$DOCKER_ARGS:

DOCKER_ARGS="-v$HOME/.m2:/root/.m2" IMAGE=srcclr/agent-maven \  ./srcclr scan --url https://github.com/srcclr/example-java-maven

Thesrcclrscript predefines a few build$TYPEs to simplify this configuration, so all of the above may be done with:

TYPE=maven ./srcclr scan --url https://github.com/srcclr/example-java-maven

About

Running SourceClear via Docker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp