Giter Club home page Giter Club logo

dockerfiles's Introduction

Dockerfiles

This repository contains a series of Dockerfiles to create containers with the in-toto Toolchain.

Available images

There are three images as of now, base, functionary, and verifier.

base

This is an alpine base image with the python version of the in-toto library pre-installed. It can be used to further develop in-toto related images.

functionary

This is an image built on top of base intended to be used as a functionary. See installation and usage to learn how to use it.

Verifier

This is an image built on top of base intended to be used as a verifier. See installation and usage to learn how to use it.

Installation and usage

To use these images you simply need to pull them from dockerhub or use the FROM intoto/base clause in your Dockerfile.

functionary

The functionary image uses two requiremed argument parameters and any further arguments can be passed to it via the docker run command. The image uses the /workbench to which a volume can be pointed to to pass artifacts to the functionary.

  • IN_TOTO_FUNCTIONARY_KEY: The path to the key used to sign link metadata.
  • STEP_NAME: the name of the step to be performed.

Usage example

A simple way to run this container is using a bind mount and run from the command line.

    docker run -v $PWD:/workbench \
        --env=[IN_TOTO_FUNCTIONARY_KEY=mykey,STEP_NAME=say-hello]\
         intoto/functionary -- sh -c 'hello world'

Using as a base image

The in-toto image is rather small, and it may not contain any binaries that you want to use within your toolchain. However, you can extend it by building a custom docker image on top of it. However, don't replace the ENTRYPOINT, as that's what in-toto will use to track provenance (however, you can define any default commands using CMD.

Verifier

The verifier works similarly to the functionary image. On the common case, you'd want to set the proper environment variables and bind-mount a volume to expose the metadata and any artifacts required for verification on to the /workbench directory:

    docker run -v $PWD/final_product:/workbench\
        --env=[IN_TOTO_LAYOUT_KEY=layout.key,LAYOUT_FILE=root.layout] \
        intoto/verifier

a note on custom inspections.

If you need additional tools to run inspections, you'd have to extend this image by using it as the base and add any additional tools you may require.

dockerfiles's People

Contributors

adityasaky avatar dependabot[bot] avatar kevholmes avatar lukebond avatar santiagotorres avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

lukebond alyptik

dockerfiles's Issues

Images are too big

The images are around 120MB.

This is quite likely because of the build toolchain (e.g., python headers, compilers and other tools).

We should strip them out of the base image during the build or use a multi-stage build

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.