Sign inSign up

skandyla/fpm

By skandyla

Updated about 7 years ago

FPM (Effing package management) in a debian image

Image
1

10K+

skandyla/fpm repository overview

Docker-fpm

Build Status

Summary

A docker image with FPM - Effing package management tool based on Debian Linux.
Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.

Repository name in Docker Hub: skandyla/fpm
Published via automated build mechanism

Docker image usage

Pull and tag (optional)
docker pull skandyla/fpm
Build on your own (optional)
docker build -t fpm .

FPM usage

fpm/wiki#usage

How to package files with fpm and docker-fpm image

Let's assume we want to package libvirt_exporter, which consist from two files, and they should be placed to:

/etc/systemd/system/multi-user.target.wants/libvirt-exporter.service
/usr/local/bin/libvirt_exporter

So create temporary directory first: $mkdir rpmbuild

Copy files to the rpmbuild directory assume it as a root path:

$tree rpmbuild/
rpmbuild/
├── etc
│   └── systemd
│       └── system
│           └── multi-user.target.wants
│               └── libvirt-exporter.service
└── usr
    └── local
        └── bin
            └── libvirt_exporter

Build rpm package:

$docker run --rm -v $(pwd):/data skandyla/fpm -s dir -t rpm -n "libvirt_exporter" -v 0.1 -p /data -C /data/rpmbuild ./

Example output:

{:timestamp=>"2018-02-11T13:46:37.459656+0000", :message=>"Created package", :path=>"/data/libvirt_exporter-0.1-1.x86_64.rpm"}

Verify package contents:

$rpm -qlp libvirt_exporter-0.1-1.x86_64.rpm
/etc/systemd/system/multi-user.target.wants/libvirt-exporter.service
/usr/local/bin/libvirt_exporter

License

MIT

Tag summary

Content type

Image

Digest

Size

109.2 MB

Last updated

about 7 years ago

docker pull skandyla/fpm