This project provides a simple framework for building RPMs under Docker and/or Vagrant.
Simply place your RPM spec files in the SPECS
directory and all local sources (sources that can't be downloaded via spectool) in the SOURCES
directory. Build as described below.
The RPMs may be built with Docker, Vagrant, or manual. The default Vagrantfile
and Dockerfile
in the project use the lastest CentOS 7 image. Change this if needed for your build requirements. The actual build logic is contained in the build.sh
script which should also be modified if needed for your particular use case.
docker build -t redline . ## build the image
docker run -v $PWD/artifacts:/tmp/artifacts -it redline ## run the image and build the RPMs
vagrant up ## provision and build the RPMs
cat build.sh ## read the script
Your RPMs and SRPMs will be copied to the artifacts
folder. Congratulations. You just built RPMs in a controlled environment in an easily reproducible manner.