All Projects → fpm-within-docker → Fpm Within Docker

fpm-within-docker / Fpm Within Docker

Licence: other
Leverage fpm inside pre-baked docker images in order to build and test native DEB and RPM packages.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Fpm Within Docker

Open Build Service
Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
Stars: ✭ 599 (+648.75%)
Mutual labels:  packaging, ubuntu, debian, centos, fedora, rpm, deb
Ansible Role Apache
Ansible Role - Apache 2.x.
Stars: ✭ 341 (+326.25%)
Mutual labels:  ubuntu, debian, centos, fedora, rhel
Ansible Role Security
Ansible Role - Security
Stars: ✭ 398 (+397.5%)
Mutual labels:  ubuntu, debian, centos, fedora, rhel
Robox
The tools needed to robotically create/configure/provision a large number of operating systems, for a variety of hypervisors, using packer.
Stars: ✭ 303 (+278.75%)
Mutual labels:  ubuntu, debian, centos, fedora, rhel
Ansible Role Firewall
Ansible Role - iptables Firewall configuration.
Stars: ✭ 343 (+328.75%)
Mutual labels:  ubuntu, debian, centos, fedora, rhel
ansible-role-daemonize
Ansible Role - Daemonize.
Stars: ✭ 14 (-82.5%)
Mutual labels:  debian, ubuntu, fedora, centos, rhel
darknet.py
darknet.py is a network application with no dependencies other than Python and Tor, useful to anonymize the traffic of linux servers and workstations.
Stars: ✭ 71 (-11.25%)
Mutual labels:  debian, ubuntu, fedora, centos, rhel
Glim
GRUB Live ISO Multiboot
Stars: ✭ 452 (+465%)
Mutual labels:  ubuntu, centos, fedora, rhel
Wireguard Install
WireGuard road warrior installer for Ubuntu, Debian, CentOS and Fedora
Stars: ✭ 650 (+712.5%)
Mutual labels:  ubuntu, debian, centos, fedora
Anlinux App
AnLinux allow you to run Linux on Android without root access.
Stars: ✭ 614 (+667.5%)
Mutual labels:  ubuntu, debian, centos, fedora
Openvpn Install
OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora
Stars: ✭ 14,199 (+17648.75%)
Mutual labels:  ubuntu, debian, centos, fedora
dist-detect
Try to determine what Linux/Unix distribution is running on a remote host and get a hint if security updates are applied.
Stars: ✭ 14 (-82.5%)
Mutual labels:  debian, ubuntu, centos, rhel
Openvpn Install
Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.
Stars: ✭ 7,142 (+8827.5%)
Mutual labels:  ubuntu, debian, centos, fedora
ansible-role-docker-ce
Ansible role to install Docker CE on AlmaLinux/Rocky/CentOS/Fedora/RHEL(Redhat)/Ubuntu/Debian/Mint/Raspbian
Stars: ✭ 73 (-8.75%)
Mutual labels:  debian, fedora, centos, rhel
Boostnote-packages
Repo containing .rpm, .deb and Boostnote app folder
Stars: ✭ 31 (-61.25%)
Mutual labels:  debian, fedora, deb, rpm
Kvm Install Vm
Bash script to build local virtual machines using KVM/libvirt and cloud-init.
Stars: ✭ 248 (+210%)
Mutual labels:  ubuntu, debian, centos, fedora
Anlinux Adfree
AnLinux, Ad free version.
Stars: ✭ 127 (+58.75%)
Mutual labels:  ubuntu, debian, centos, fedora
Anlinux Resources
Image and Script for LinuxOnAndroid App
Stars: ✭ 135 (+68.75%)
Mutual labels:  ubuntu, debian, centos, fedora
Atilo
Linux installer for termux
Stars: ✭ 629 (+686.25%)
Mutual labels:  ubuntu, debian, centos, fedora
Docker Rpm Builder
Build native RPM packages for Centos/RHEL/Fedora from any Linux distro or even OSX, by leveraging docker capabilities.
Stars: ✭ 366 (+357.5%)
Mutual labels:  packaging, centos, fedora, rpm

fpm-within-docker

VERY IMPORTANT NOTICE: because of time constraints, I'll keep this updated for Centos, Debian and Ubuntu LTS. Fedora and Ubuntu intermediate releases will be dropped. If I'm lagging behind, please open a ticket.

Pre-baked images for RPM and DEB package building. fpm is included!

All images should be updated to the latest FPM version, currently: 1.11.0.

Donate!

Do you like this project? Is it useful to you? If you'd like to reward me, donate something from my wish list

what does this do?

If you don't want to spend your nights in learning packaging an RPM or a DEB - which is a good idea - FPM can help. But, out of the box, fpm doesn't provide a "sandbox" or any other "isolated environment" for building. Here comes this set of images.

You should still know something about package building.

For RPM see Maximum RPM, Fedora RPM Howto, or Fedora RPM Guide.

For DEB, see Debian How To Package or Ubuntu Packaging New Software.

You'd better know what docker is, as well.

Usage

I recommend you take a look at the example in the example project directory - it's an example build of a lua interpreter for Centos7 and Ubuntu Trusty. The directory contains the extracted source of lua 5.3.1, while the packaging dir contains our build scripts. The main build scripts are commented and will tell you what you should know: see build for centos 7 and build for ubuntu trusty

The build chain goes something like this:

  • First, a build-image is constructed via docker. That usually inherits from an fpm-within-docker image. This image should include whatever is needed to build the software - most probably a bunch of -dev or -devel packages. I suggest you don't install requirements which are specific to your project rather than your OS - i.e. don't do pip install or gem install for your project dependencies. Although that could provide faster build speed, it will mingle OS dependencies with project level dependencies, and later it could happen that your project builds even though you forgot a dependency in your project file.
  • Then, a build script is run into a container from that build image. Such build script can access the software source, which is usually employed to build and install the software, and performs the actual dep fetching, build, and install, so you'll get the software installed as it should be in such docker container - i.e. /usr/bin/mybinary and /usr/share/mybinary/something. Then, at the end of the build script, fpm is invoked with such paths and will create a deb/rpm package containing the binaries.
  • After that (optionally), a test-image is constructed via docker. That doesn't inherit from an fpm-within-docker image; it's an image as bare as possible should be used, since the dependency checking part is performed in the next step.
  • As a last step, a test script is invoked within a container launched from the test image. Such script should install the package that was just built, should let the package manager install any required dependency, and should run the test suite for the software, which will be tested in an environment very close to actual production scenario. This is especially useful to detect issues with missing or broken dependencies.

I suggest you just copy the whole packaging directory from the examples to your own project, then you add/remove the various distro-related subdirectories and modify them in place.

Goodies

I don't necessarily include apt-current anymore.

Limitations

Currently the images are x86_64 only. There's an exception for centos5 i386, since I had an actual use case, but its creation was very tedious, and docker doesn't officially endorse 32 bit guests.

I'll add 32 bit images only if help is provided.

Signing RPMs

Fpm supports signing rpms, but there's a minimum of setup involved; check the build for centos 7 to see how it's done. You can both sign and verify the signature is OK.

DEB packages are signed in the repository only, so no issue while building.

Using the fpm-within-docker images

They're available on Docker hub, so they can be used straight from your docker command line, without the need of rebuilding them locally.

fpm-within-docker images on Docker Hub

All images are are x86_64 only. Please note: some older images may exist on docker hub, but if they're not listed down there, consider them unsupported.

I'll usually add images for Centos, Fedora, Ubuntu and Debian as soon as they get out, and I'll try supporting them as long as they're supported upstream.

Available images:

alanfranz/fpm-within-docker:centos-6
alanfranz/fpm-within-docker:centos-7
alanfranz/fpm-within-docker:debian-jessie
alanfranz/fpm-within-docker:debian-stretch
alanfranz/fpm-within-docker:ubuntu-trusty
alanfranz/fpm-within-docker:ubuntu-xenial
alanfranz/fpm-within-docker:ubuntu-bionic
alanfranz/fpm-within-docker:ubuntu-focal

Thanks, in no special order

  • Kevin Pankonen
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].