Skip to content

Instantly share code, notes, and snippets.

@fser
Created October 3, 2017 14:13
Show Gist options
  • Save fser/a3bd2bd7d750b7524a44ceebdb660b33 to your computer and use it in GitHub Desktop.
Save fser/a3bd2bd7d750b7524a44ceebdb660b33 to your computer and use it in GitHub Desktop.
Docker file used to build exabgp's debian package

Requirements

docker will be used to build the package.

Howto

This asumes you have retrieved both the Dockerfile and the build.sh script.

Build the docker image

$ docker build -t build_exa .
[ lot of lines ]

Validate the image is present in your docker setup

$ docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
build_exa                    latest              72122d8c3b29        7 seconds ago       654.4 MB

Run bash inside the container

$ docker run -it build_exa /bin/bash
root@51040f44be34:/#

From now on, run the build script

root@51040f44be34:/#
/root/build.sh 
Cloning into 'exabgp'...
remote: Counting objects: 37857, done.
remote: Total 37857 (delta 0), reused 0 (delta 0), pack-reused 37857
Receiving objects: 100% (37857/37857), 11.67 MiB | 21.65 MiB/s, done.
Resolving deltas: 100% (23797/23797), done.
Branch debian/sid set up to track remote branch debian/sid from origin.
Switched to a new branch 'debian/sid'
This package has a Debian revision number but there does not seem to be
an appropriate original tar file or .orig directory in the parent directory;
(expected one of exabgp_4.0.0.orig.tar.gz, exabgp_4.0.0.orig.tar.bz2,
exabgp_4.0.0.orig.tar.lzma,  exabgp_4.0.0.orig.tar.xz or exabgp.orig)
continue anyway? (y/n) y <<<<---- answer 'y' here

[ some other output ]
#!/usr/bin/env bash
git clone https://github.com/Exa-Networks/exabgp.git
cd exabgp
git checkout debian/sid
debuild -us -uc
FROM debian:stable
RUN apt-get update && apt-get install -y git-core devscripts build-essential lintian python-setuptools python-all python3-all python3-setuptools python-ipaddr python-nose python-psutil python3-nose python3-psutil
COPY build.sh /root
RUN chmod +x /root/build.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment