Giter VIP home page Giter VIP logo

mk-builder's Introduction

mk-builder:base Build Status
mk-builder:wheezy-64 Build Status
mk-builder:wheezy-32 Build Status
mk-builder:wheezy-armhf Build Status
mk-builder:jessie-64 Build Status
mk-builder:jessie-32 Build Status
mk-builder:jessie-armhf Build Status
mk-builder:raspbian-armhf Build Status

mk-builder: Build Machinekit in Docker on Travis CI

The Machinekit project targets Debian Wheezy and Jessie, running on amd64, i386 and armhf architectures. These Dockerfiles build images for each combination of these Debian suites and CPU architectures.

The Docker hub and Travis CI build environments only support x86 architectures and builds for armhf must be emulated in a chroot; for uniformity, we also run x86 builds in a chroot.

The base container image common to all builds is a 64-bit Debian Jessie Docker image built from the mkdocker-base directory. On top of this, container images for each $SUITE-$ARCH combination are built from the top-level directory as separate Docker tags. These images each contain a chroot filesystem in /opt/rootfs with all Machinekit build dependencies pre-installed.

To build the chroots on Docker hub and to run Machinekit builds within them on Travis CI, we use proot, a "user-space implementation of chroot, mount --bind, and binfmt_misc", since chroot can not work with the restricted privileges in the Docker hub and Travis CI environments.

How to build the images

The base image may already be available on Docker hub. It may be rebuilt with the Dockerfile in the mkdocker-base directory.

The final images are built from the top-level Dockerfile. This git repo contains one branch per $SUITE-$ARCH tag. Any changes should be committed to the base branch, and then propagated to the other branches; these other branches are identical to base except for one commit setting the $SUITE and $ARCH variables in the top-level Dockerfile. The do-rebase.sh script may help propagate these changes.

For example, if you rebuild the base image tagged as jdoe/mk-builder:base, rebuild the final images as follows:

$ git checkout base  # always edit the 'base' branch
$ $EDITOR Dockerfile # change top line-> 'FROM jdoe/mk-builder:base'
$ git commit Dockerfile -m 'set base image'
$ ./do-rebase.sh     # Warning!  Dangerous!

The do-rebase.sh script can be dangerous! Be sure you understand what it does, or else propagate your changes to the other branches manually.

The do-rebase.sh script should rebase the other branches on top of your changes in the base branch. Check the output of git show-branch: the base branch should be a common ancestor to all other branches, which should each have exactly one more commit on top labeled set build to SUITE-ARCH.

After this, build the container. Build locally:

$ git checkout jessie-64  # adjust branch as needed
$ docker build -t jdoe/mk-builder:$(git rev-parse --abbrev-ref HEAD) .

Or build on the Docker Registry from your GitHub repo. Create the Docker Hub repo and create an automated build. Update the build settings with the branch names, e.g. jessie-64, or all Jessie builds with/^jessie-.*$/. Enable the Docker webhook on the GitHub repo to notify the hub of changes. Then push your changes as follows to trigger an automatic build:

$ git push --all -f  # DANGEROUS force-push all branches

mk-builder's People

Contributors

kinsamanka avatar zultron avatar

Watchers

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