HUB
Sign inSign up
rpmbuilder-centos logo

alectolytic/rpmbuilder-centos

By alectolytic

•Updated over 11 years ago

Image
0

720

alectolytic/rpmbuilder-centos repository overview

⁠Dockerfile: RPM Builder (CentOS)

A CentOS based RPM Build Environment.

docker pull alectolytic/rpmbuilder-centos

⁠Build and Run

⁠Build
docker build --tag alectolytic/rpmbuilder-centos .
⁠Run

In this example SOURCE_DIR contains spec file and sources for the the RPM we are building.

# set env variables for conviniece
SOURCE_DIR=$(pwd)/sources
TARGET_DIR=$(pwd)/target

# create a target directory
mkdir -p ${TARGET_DIR}

# make SELinux happy
chcon -Rt svirt_sandbox_file_t ${TARGET_DIR} ${SOURCE_DIR}

# build rpm
docker run \
    -v ${SOURCE_DIR}:/sources \
    -v ${TARGET_DIR}:/target \
    alectolytic/rpmbuilder-centos

The output files will be available in TARGET_DIR.

⁠Volumes

The following volumes can be mounted from the host.

VolumeDescription
/sourcesSource to build RPM from
/targetTarget directory where all built RPMs and SRPMs are extracted to
/workspaceTemporary workspace created for staging sources
/root/rpmbuildrpmbuild directory for debugging etc
Tag summary
Recent tags
Content type
Image
Digest
sha256:dfea295a8…
Size
126.3 MB
Last updated
over 11 years ago
docker pull alectolytic/rpmbuilder-centos:latest