GithubHelp home page GithubHelp logo

isabella232 / image-build-daemon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift/image-build-daemon

0.0 0.0 0.0 8.32 MB

A Kubernetes-aware Docker build API extensions

Go 99.48% Makefile 0.52%

image-build-daemon's Introduction

image-build-daemon

This project is in early alpha and may change significantly in the future.

The image-build-daemon acts as a Kubernetes-aware Docker build endpoint that limits what operations clients can perform to a safe subset and ensures the resources those clients consume are charged back to their pod. It automatically injects a Docker-API compatible unix domain socket into any pod that mounts a read-write emptydir to /var/run/docker/, and then accepts the following Docker API calls:

  • build: Perform Docker builds that are placed into the calling pod's cgroup
  • tag: Tag an image that was created by a build with a different name
  • list-images: List any images built by this pod
  • remove-image: Remove an image created by this pod
  • push: Push an image created by this pod

The daemon performs cleanup, quota, and scoping to the calling pod, ensuring that resources consumed by a build pod are fairly used. The normal Docker CLI or API client can create operations, although not all parameters are supported.

The daemon also supports multiple backends with the future goal of removing the need for a Docker daemon on the host, specified with --mode:

  • passthrough - Use the host's Docker socket to perform operations
  • imagebuilder - Use the imagebuilder library to perform more efficient builds
  • FUTURE: buildah - Avoid using a shared daemon and instead execute builds under the calling pod's context.

Trying it out

Clone the source into your GOPATH and build with:

make

To test locally without a running Kubernetes server, start your Docker daemon and then run:

./image-build-daemon -v=5 --bind-local=/tmp &

To start the daemon running in the background. Then launch a fake Kubernetes container with

make fake

The container named daemon-test will be started, and image-build-daemon will create /tmp/docker.sock (due to --bind-local being passed).

To test against the daemon, run

export DOCKER_HOST=unix:///tmp/docker.sock 
docker build vendor/github.com/openshift/imagebuilder/dockerclient/testdata/volume/

And you should see a build created.

image-build-daemon's People

Contributors

smarterclayton 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.