GithubHelp home page GithubHelp logo

nwtgck / docker-repository Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 14 KB

πŸ›‘οΈSecure Automated-Build Docker Repository: Proof of integrity by CI

License: MIT License

Ruby 85.96% Shell 14.04%
docker registry safety security automation auto-build

docker-repository's Introduction

docker-repository

Build Status

Automated-Build Docker Repository for Security

Purpose

Guarantee that Docker images are built definitely by a trusted third party.

Even if someone enable Docker automation-build, the owners can push Docker Hub from their local machine. So, someone bad guy can push malicious images.

This repository guarantees the images are completely built in Travis CI, and the image tar files are published to GitHub Releases. For proof of integrity, SHA256 of tar files are calculated.

You can verify SHA256 in Travis CI output and downloaded files. This ensures that your files should be built on Travis CI, and the build formula, Dockerfile and build script, "build.bash" are public without malicious code on GitHub.

Example Release

Here is an example release.
You can verify SHA256 on the Travis job corresponding to the release and ones of your downloaded files.

How to get Docker image

Here is an example to load Docker image.

# Download
wget https://github.com/nwtgck/docker-repository/releases/....../myimage.tar
# Load
docker load < myimage.tar

Then, docker images should output loaded image.
You can calculate SHA256 by shasum -a myimage.tar.

Structure

Here is the project structure.

  • Each repository must be under ./repos directory.
  • Each repository must have build.bash.
  • The build.bash must create ./dist directory.
  • The ./dist should have files of Docker image tar files.
repos/
β”œβ”€β”€ hogeuser1
β”‚   └── mydockerimage1
β”‚   β”‚  └── build.bash
β”‚   └── mydockerimage2
β”‚       └── build.bash
β”‚       └── myasset1.txt
β”œβ”€β”€ hogeuser2
β”‚   └── mydockerimage1
β”‚       └── build.bash
└── ...

How to trigger Docker build

Special commit message triggers Docker build.
For example, commit message, "#[nwtgck/piping-server] Bump up to 0.9.2" triggers bash repos/nwtgck/piping-server/build.bash.
After build in Travis CI, the image will be available in GitHub Releases like an example release.
The format is like #[myimage_name]. repos/myname should exists in this repo. The commit message should contain one #[myimage_name] because too much image build consume a lot of time.

docker-repository's People

Contributors

nwtgck avatar

Watchers

 avatar  avatar  avatar

docker-repository's Issues

Skip tag build on Travis CI

Background

build.rb creates tag automatically and publishes on GitHub Releases. Travis CI builds on new tags. But this build triggered by tags is useless and consume Travis CI resources. So, I'd like to do some setting to stop tag build.

Note that this is not an emergency issue. Tag builds are just useless and consuming resources (time and queue).

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.