Code Monkey home page Code Monkey logo

coreos-developer-docker's Introduction

CoreOS Container Linux - Development Docker Container

Build Status

This repository automatically builds a Docker container of the CoreOS Container Linux Development image.

The development image contains a more complete linux including a full compiler toolchain. It allows to modify, extend or build custom binaries, drivers or libraries for Container Linux that are not included in the production image.

Here we automatically turn the raw developer image into a Docker container. It allows us to use the familiar Docker workflow. It is especially nice in combination with multi-stage Docker builds, which allows to create minimal transport images without the build chain overhead.

Travis Configuration

The build is using a cron job that executes the build daily. It creates alpha, beta and stable images. It first pulls the current versions of each CoreOS release channel. Then it checks if the corresponding image already exists on Dockerhub. Only then rebuild the image.

This makes the build indempotent and avoids daily churn on Travis.

With the way CoreOS is promoting versions through the channels, this will usually only build new alpha versions. There's a maximum latency from release to availability of this Docker image.

Docker Image

Find the image on Docker Hub: https://hub.docker.com/r/bugroger/coreos-developer/

docker pull bugroger/coreos-developer:1576.5.0

Usage in Docker

In order to use this image for compilation of kernel modules, there is some additional steps as descripted in the Container Linux Developer Guide.

In Docker the /proc filesystem does not work as expected, so a few modifications are required.

This is an example multi-stage Dockerfile:

ARG COREOS_VERSION=1576.5.0

FROM bugroger/coreos-developer:${COREOS_VERSION} as BUILD

RUN emerge-gitclone
RUN . /usr/share/coreos/release && \
  git -C /var/lib/portage/coreos-overlay checkout build-${COREOS_RELEASE_VERSION%%.*}
RUN emerge -gKv coreos-sources > /dev/null
RUN cp /usr/lib64/modules/$(ls /usr/lib64/modules)/build/.config /usr/src/linux/
RUN make -C /usr/src/linux modules_prepare

# Your custom code here
# WORKDIR /tmp/build
# RUN git clone ... && make all

FROM alpine 
COPY --from=BUILD /tmp/build/output /opt/custom

And execute with:

docker build \
  --build-arg COREOS_VERSION=1662.0.0 \
  --tag ${DOCKER_USERNAME}/${IMAGE}:${COREOS_VERSION}-${DRIVER_VERSION} \
  --rm \
  .

A complete example using this technique can be seen at coreos-nvidia-driver

coreos-developer-docker's People

Contributors

bugroger avatar

Watchers

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