Clone this project
$ git clone https://github.com/wadahiro/ruby-rpmbuild-container.git
Start the guest machine
$ cd ruby-rpmbuild-container
$ vagrant up
$ vagrant ssh
Build docker container
$ cd /tmp/rpmbuild
$ sudo docker build -t <USERNAME>/rubybuild .
rpmbuild in the container
$ sudo docker run --rm -v $PWD:/shared:rw -it <CONTAINER_ID> /bin/sh ./rubybuild.sh
check the rpm file on virtual machine
$ ls *.rpm
ruby-2.1.2-2.el6.x86_64.rpm
Enjoy!
Content type
Image
Digest
sha256:3dd38c6eb…
Size
153.1 MB
Last updated
almost 11 years ago
docker pull wadahiro/ruby-rpmbuild-container:ruby-2.1.2