Giter Club home page Giter Club logo

docker-rhel-rpm's Introduction

This repository contains the files needed to build RPMs for the dependencies of Docker on Red Hat Enterprise Linux 6 and derivatives like CentOS and Scientific Linux. The kernel spec file is based on the kernel-ml package from ELRepo but adds aufs support. The lxc spec file is copied from Fedora.

Before building the packages, be sure to install fedora-packager and add yourself to the mock group.

You can build the packages with the following commands. Note that building the kernel can take a long time, maybe even hours. If you want to build these for Fedora instead of RHEL, when running mock you should replace epel-6-x86_64 with fedora-19-x86_64. Also, you can skip building the lxc rpm because it already exists in Fedora's repository.

# build docker rpm
spectool -g -C lxc-docker lxc-docker/lxc-docker.spec 
mock -r epel-6-x86_64 --buildsrpm --spec lxc-docker/lxc-docker.spec --sources lxc-docker --resultdir output
mock -r epel-6-x86_64 --rebuild --resultdir output output/lxc-docker-0.6.3-2.el6.src.rpm 

# build lxc rpm
spectool -g -C lxc lxc/lxc.spec
mock -r epel-6-x86_64 --buildsrpm --spec lxc/lxc.spec --sources lxc --resultdir output
mock -r epel-6-x86_64 --rebuild --resultdir output output/lxc-0.8.0-3.el6.src.rpm

# build kernel rpm
spectool -g -C kernel-ml-aufs kernel-ml-aufs/kernel-ml-aufs-3.10.spec
git clone git://git.code.sf.net/p/aufs/aufs3-standalone -b aufs3.10
pushd aufs3-standalone
git archive aufs3.10 > ../kernel-ml-aufs/aufs3-standalone.tar
popd
mock -r epel-6-x86_64 --buildsrpm --spec kernel-ml-aufs/kernel-ml-aufs-3.10.spec --sources kernel-ml-aufs --resultdir output
mock -r epel-6-x86_64 --rebuild --resultdir output output/kernel-ml-aufs-3.10.11-1.el6.src.rpm

The resulting RPMs will be placed in a directory named output. You can install them with

cd output
yum localinstall --nogpgcheck kernel-ml-aufs-3.10.11-1.el6.x86_64.rpm lxc-0.8.0-3.el6.x86_64.rpm lxc-libs-0.8.0-3.el6.x86_64.rpm lxc-docker-0.6.3-2.el6.x86_64.rpm

In order to use docker, you'll need to configure the cgroup filesystem and reboot into your new kernel. Add the line

none                    /sys/fs/cgroup          cgroup  defaults        0 0

to /etc/fstab. Reboot and choose the 3.10 kernel from your GRUB menu (or edit /boot/grub/grub.conf and change your default kernel).

The docker daemon should have started automatically; this can be controlled by via initctl. To give a non-root user permission to use docker, add them to the docker group.

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.