FPM (Effing package management) in a debian image
10K+
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 pull skandyla/fpm
docker build -t fpm .
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
MIT
Content type
Image
Digest
Size
109.2 MB
Last updated
about 7 years ago
docker pull skandyla/fpm