Coder Social home page Coder Social logo

00mjk / xenserver-build-env Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xenserver/xenserver-build-env

0.0 0.0 0.0 98 KB

Files for creating a XenServer build environment in a Docker container

License: MIT License

Shell 40.77% Python 27.42% XS 8.68% Roff 11.38% Dockerfile 11.75%

xenserver-build-env's Introduction

xenserver-build-env

Build status Docker pulls

This docker config and collection of supporting scripts allows for creating a docker container to work on and build a XenServer package from an SRPM. It will build a Docker container with the right build environment (including some useful tools) and then install all of the build-dependencies of the given pacakge. You will then be in a chroot from which you can clone and build the source.

By default, the container references a yum repository that comes from the nightly snapshot uploads to xenserver.org.

Configuration

You'll need to install docker. Follow the instructions for your platform on https://www.docker.com/

Building

Either build the docker image yourself:

docker build -t xenserver/xenserver-build-env .

or pull from the Docker Hub:

docker pull xenserver/xenserver-build-env

Building packages

Install the dependencies of the package using yum:

yum-builddep xapi

then either download the SRPM using yumdownloader:

yumdownloader --source xapi
rpmbuild --rebuild xapi*

or clone the source from github or xenbits:

git clone git://github.com/xapi-project/xen-api
cd xen-api
./configure
make

Mounting repos from outside the container

If you'd like to develop using the tools on your host and preseve the changes to source and revision control but still use the container for building, you can do using by using a docker volume.

Once you have built your image you can run it with an extra argument to mount a directory from your host to a suitable point inside the container. For example, if I clone some repos into a directory on my host, say /work/code/, then I can mount it inside the container as follows:

docker run -i -t -v /work/code:/mnt/repos -u $(id -u) <IMAGE> /bin/bash

The -u flag uses the right UID inside so that changes made in the container are with the same UID as outside the container. Docker >=1.6 supports group IDs as well and both the group and user can be referenced by name.

Then the following format is available to set the UID/GID:

-u, --user=                Username or UID (format: <name|uid>[:<group|gid>])

xenserver-build-env's People

Contributors

edwintorok avatar frezzle avatar gaborigloi avatar johnelse avatar jonludlam avatar lindig avatar mseri avatar noncreature0714 avatar robhoes avatar simonjbeaumont 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.