Build native RPM packages for Centos/RHEL/Fedora from any Linux distro or even OSX, by leveraging docker capabilities.
Build native RPM packages for Centos/RHEL/Fedora from any Linux distro or even OSX, by leveraging docker capabilities.
CALL FOR DEVELOPERS version 2.0: I made a configuration mistake on mail filters and I wouldn't read many github notification for the past year, so I might not have read help offers. Now my filters are properly configured.
docker-rpm-builder once was quite relevant to my daily job, so I took the time to write and support it. But it is less and less relevant to me, and it requires constant maintenance (new distros come, old distros go, features are requested, et cetera). I would appreciate some help. Write a response to https://github.com/alanfranz/docker-rpm-builder/issues/51 and become a developer!
IMPORTANT: Docker has changed the distribution repos (both APT and YUM) for its packages. See the updated instructions and repos at docs.docker.com. The new free package is called docker-ce.
IMPORTANT: The APT and YUM repos have changed! Check the new URLs down there!
IMPORTANT: since 1.33, docker-rpm-builder won't force a dependency on a specific docker package, you must install a docker distribution yourself - see prerequisites.
See the News Page for all the latest news.
See also FPM within Docker - an alternative way of building RPMs and DEBs that could make things even easier for you.
docker-rpm-builder is got a number of faithful users and followers; now you can donate to the project,
not in the form of money (maybe I'll start accepting some BTC in the near future, but not right now) but in the
form of goods; if you find this project useful and you'd like to reward me for my work, you can
buy me something from my Amazon wish list.
If you already know a bit about RPM packaging, and you're quite confident reading or writing a specfile, either because you need to (e.g. you've got a package that needs very fine tuning) or because you must (e.g. you need your package to work in existing distributions' workflows where a .src.rpm and a specfile are required).
If you just need to package your software in an RPM and don't care too much about conventions, fine tuning, ecc, take a look at FPM within Docker. It'll make your life easier without much fuss.
If you think that:
then you're in the right place.
Basically, docker-rpm-builder is an ecosystem comprising a way to run rpmbuild inside docker-based containers. Both the tool and a basic set of target build images is included.
You should have a vague idea of what docker is and you should already know how to build an RPM - see to Maximum RPM and other documentation from Fedora HowTO / RPM Guide.
IMPORTANT: A Docker distribution is required in order to use this tool. I recommend using the latest stable docker-ce RPM or DEB, use prebuilt packages package from yum.dockerproject.org or apt.dockerproject.org; just follow the official install instructions.
At the dawn of this tool, I tried to make it work with any version of docker that would come from the distributions' repository or from official repository. This proved to be quite troublesome, but at the same time, different distributions are repackaging the docker CLI and daemon in different ways, and users have different priorities. So, since version 1.33 docker-rpm-builder no longer forces a dependency on any docker package on your system. Feel free to use whatever docker version you like; just be aware that I usually test docker-rpm-builder using the official docker-ce packages.
Python 2.7, bash, and wget should be installed on your system as well. If you're using a packaged version, the package will take care of that.
Please note: docker runs on the host system; it is irrelevant whether the target distribution would be able to run docker - in fact you can build Centos/RHEL 5 and 6 packages perfectly.
See the section below for details on some post-install actions for docker.
If docker is already up and running on your system, you probably need to do absolutely nothing else.
Otherwise, if it's your first time with docker, here's a checklist:
CentOS 6 / RHEL 6 support for docker-rpm-builder has been discontinued along docker's own support. I'm sorry. If you really need to use such distros, you can try the source install described below, along with docker 1.7.
/etc/yum.repos.d/docker-rpm-builder-v1.repo
[docker-rpm-builder-v1]
name=docker-rpm-builder-v1
baseurl=https://dl.bintray.com/alanfranz/drb-v1-centos-7
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://www.franzoni.eu/keys/D1270819.txt
https://www.franzoni.eu/keys/D401AB61.txtNow, just:
yum install docker-rpm-builderAnd you're done; if you haven't already done so, check the docker configuration section, then launch the test suite
I plan to support the latest CentOS/RHEL stable.
Use this yum repository:
/etc/yum.repos.d/docker-rpm-builder-v1.repo
[docker-rpm-builder-v1]
name=docker-rpm-builder-v1
baseurl=https://dl.bintray.com/alanfranz/drb-v1-fedora-$releasever
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://www.franzoni.eu/keys/D1270819.txt
https://www.franzoni.eu/keys/D401AB61.txtdnf install docker-rpm-builderAnd you're done; if you haven't already done so, check the docker configuration section, then launch the test suite
I plan to support the latest two Fedora releases,unless something bad happens (i.e. the official docker-package is not released anymore for the older fedora), so currently fc26 and fc27 are supported.
First, you should make sure that Bintray's package signing key properly installed and configured for apt:
curl https://www.franzoni.eu/keys/D401AB61.txt | sudo apt-key add -And you should make sure the apt-transport-https package is installed.
Then, pick the repo for your distribution - see below - and save it as /etc/apt/sources.list.d/docker-rpm-builder.list
deb https://dl.bintray.com/alanfranz/drb-v1-debian-jessie jessie mainor
deb https://dl.bintray.com/alanfranz/drb-v1-debian-stretch jessie mainNow you're ready to
apt-get update
apt-get -y install docker-rpm-builderAnd you're done; if you haven't already done so, check the docker configuration section, then launch the test suite
I plan to support the latest stable Debian release. When a new release comes out, I'll support the oldstable for a few months before dropping it.
There're repositories for various Ubuntu versions.
First, you should make sure that you've got Bintray's package signing key properly installed and configured for apt:
curl https://www.franzoni.eu/keys/D401AB61.txt | sudo apt-key add -And you should make sure the ```apt-transport-h
No open issues yet, or sync has not completed.