Giter Club home page Giter Club logo

docker-debbuild's Introduction

docker-debbuild

Build .debs using Docker

This box allow easy building of .debs from either Debian/Ubuntu source packages or unpacked sources you mount to the container.

Automated scripts install build dependencies described in debian/control and run the actual build.

If you mount your host directory to /artifacts, .debs will be copied there after the build succeeds.

Usage:

Build package 'nano' from it's upstream sources for Debian sid

docker run --volume $(pwd)/artifacts:/articats:rw -e PACKAGE=nano ypcs/debbuild:debian-sid

Build package 'vim' from it's upstream sources for Ubuntu bionic

docker run --volume $(pwd)/artifacts:/articats:rw -e PACKAGE=vim ypcs/debbuild:ubuntu-bionic

Build "random" package using sources we just cloned from the web. Requirement: must have working debian/ build configuration. Use Debian buster as build environment.

git clone https://github.com/SOMETHING/somewhere.git mysources

docker run --volume $(pwd)/artifacts:/artifacts:rw --volume ./mysources:/usr/src/mysources:rw -e SOURCE_DIR=/usr/src/mysources ypcs/debbuild:debian-buster

Advanced

If you need to eg. use your own sources or do other stuff, you can just use these images as base image. Ie. you can do something like

FROM ypcs/debbuild:debian-sid

RUN echo 'deb http://custom-repository.net/debian sid main' >> /etc/apt/sources.list.d/custom.list && \
    apt-get update && apt-get -y install git

RUN git clone https://your-custom-source.net/path/to/repo

then, build image

docker build -t mycustombuilder .

and finally execute like other debbuild boxes

docker run --volume $(pwd)/artifacts:/artifacts:rw --volume ./mysources:/usr/src/mysources:rw -e SOURCE_DIR=/usr/src/mysources mycustombuilder

Development

Development is done in master branch. Changes should be synced to version-specific branches, and then Dockerfile should be updated using Makefile magic.

Example:

# Ensure we have latest master
git checkout master
git pull

# Let's create branch for next Debian release
git checkout -b debian-bullseye
make Dockerfile
git add Dockerfile
git commit -m "Add new release: Debian bullseye"

Then, someone has modified master, eg. added new feature. We want to refresh configuration for some release, let's say for Ubuntu bionic.

git checkout ubuntu-bionic
git rebase origin/master

To update all branches you could also run something like

git fetch --all
for branch in $(git br |grep -v master |xargs) ; do git checkout "${branch}" ; git rebase master ; make Dockerfile ; git add Dockerfile ; git commit -m "Update to latest Dockerfile" ; git rebase "origin/${branch}" ; git push ; done

docker-debbuild's People

Contributors

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