Git Product home page Git Product logo

docker-blackduck's Introduction

Build Status Slack

Docker images

This repo will contain docker images with Blackduck

Current versions available:

.
├── 6
│   ├── golang
│   ├── java
│   ├── node
│   ├── python
│   ├── dotnetcore-2.2.110
│   ├── dotnetcore-3.0.101
│   ├── dotnetcore-3.1.102
│   └── dotnetcore-3.1.302
│   └── docker

Usage

Images can be found on https://hub.docker.com/r/philipssoftware/blackduck/.

docker run philipssoftware/blackduck:6 /app/detect.sh --help
docker run philipssoftware/blackduck:6 /app/detect.sh -hv 

In order to analyse a project use the following structure.

Replace all variables with your own variables

Source code scan
docker run -v $(pwd):/code philipssoftware/blackduck:6 /app/detect.sh --blackduck.url=<your-blackduck-url> --blackduck.api.token=<your-token> --blackduck.trust.cert=true --detect.policy.check=true --detect.source.path=/code --detect.project.name=<your-project-name> --detect.project.version.name=<your-version>
Docker image scan
# If you can share docker mount with blackduck imageinspector
docker run -v /var/run/docker.sock:/var/run/docker.sock --network="host" philipssoftware/blackduck:6-docker /app/detect.sh --blackduck.url=<your-blackduck-url> --blackduck.api.token=<your-token> --blackduck.trust.cert=true --detect.policy.check=true --detect.project.name=<your-project-name> --detect.project.version.name=<your-version> --detect.docker.image=<your-image>

# If you want to mount and provide blackduck imageinspector working directory
mkdir $(pwd)/shared
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):$(pwd) --network="host" -w $(pwd) philipssoftware/blackduck:6-docker /airgap/packaged-inspectors/docker/blackduck-docker-inspector.sh --blackduck.url=<your-blackduck-url> --blackduck.api.token=<your-token> --blackduck.trust.cert=true --detect.policy.check=true --detect.project.name=<your-project-name> --detect.project.version.name=<your-version> --detect.docker.image=<your-image> --shared.dir.path.local=$(pwd)/shared

Air Gap

By setting setting the environment variable DETECT_AIR_GAP to true you can enable Air Gap. This eliminate the need for internet access that Detect requires to download those dependencies. Currently only the gradle inspector is supported. This mode is particularly useful when you are behind a corporate firewall which blocks connections to JFrog Artifactory.

Example:

docker run -e DETECT_AIR_GAP=true -v $(pwd):/code philipssoftware/blackduck:6 /app/detect.sh --blackduck.url=<your-blackduck-url> --blackduck.api.token=<your-token> --blackduck.trust.cert=true --detect.policy.check=true --detect.source.path=/code --detect.project.name=<your-project-name> --detect.project.version.name=<your-version>

Content

The images obviously contain blackduck and java8, but also two other files:

  • REPO
  • TAGS

REPO

This file has a url to the REPO with specific commit-sha of the build. Example:

$ docker run philipssoftware/blackduck:6 cat REPO
https://github.com/philips-software/docker-blackduck/tree/facb2271e5a563e5d6f65ca3f475cefac37b8b6c

TAGS

This contains all the similar tags at the point of creation.

$ docker run philipssoftware/blackduck:6 cat TAGS

blackduck blackduck:6 blackduck:6.9 blackduck:6.9.0

You can use this to pin down a version of the container from an existing development build for production. When using blackduck:6 for development. This ensures that you've got all security updates in your build. If you want to pin the version of your image down for production, you can use this file inside of the container to look for the most specific tag, the last one.

Simple Tags

blackduck

blackduck with node

  • blackduck:node, blackduck:6-node, blackduck:6.9-node, blackduck:6.9.0-node 6/node/Dockerfile

blackduck with python

  • blackduck:python, blackduck:6-python, blackduck:6.9-python, blackduck:6.9.0-python 6/python/Dockerfile

blackduck with golang

  • blackduck:golang, blackduck:6-golang, blackduck:6.9-golang, blackduck:6.9.0-golang 6/golang/Dockerfile

blackduck with dotnetcore-2.2.110

  • blackduck:dotnetcore-2.2.110, blackduck:6-dotnetcore-2.2, blackduck:6.9-dotnetcore-2.2.110, blackduck:6.9.0-dotnetcore-2.2.110 6/dotnetcore-2.2.110/Dockerfile

blackduck with dotnetcore-3.0.101

blackduck with dotnetcore-3.1.102

blackduck with dotnetcore-3.1.302

  • blackduck:dotnetcore, blackduck:6-dotnetcore, blackduck:6-dotnetcore-3, blackduck:6-dotnetcore-3.1, blackduck:6.9-dotnetcore, blackduck:6.9-dotnetcore-3.1, blackduck:6.9.0-dotnetcore, blackduck:6.9.0-dotnetcore-3.1.302 6/dotnetcore-3.1.302/Dockerfile

blackduck with docker detector

  • blackduck:docker, blackduck:6-docker, blackduck:6.9-docker, blackduck:6.9.0-docker 6/docker/Dockerfile

Why

Why do we have our own docker image definitions?

We often need some tools in a container for checking some things. F.e. jq, aws-cli and curl. We can install this every time we need a container, but having this baked into a container seems a better approach.

That's why we want our own docker file definitions.

Known Issues

Currently this image only has java. Running a project with yarn or npm will not work yet.

Issues

License

License is MIT. See LICENSE file

Contributors

Philips Forest

This module is part of the Philips Forest.

                                                     ___                   _
                                                    / __\__  _ __ ___  ___| |_
                                                   / _\/ _ \| '__/ _ \/ __| __|
                                                  / / | (_) | | |  __/\__ \ |_
                                                  \/   \___/|_|  \___||___/\__|  

                                                                 Infrastructure

Talk to the forestkeepers in the docker-images-channel on Slack.

Slack

docker-blackduck's People

Contributors

jeroenknoops avatar dependabot[bot] avatar bartgolsteijn avatar loafoe avatar github-actions[bot] avatar bhuvanasanthoshkumar avatar marcofranssen avatar prakashguru avatar dmixonphilips avatar sudheeshps avatar marcel-dias avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.