Public | Automated Build

Last pushed: 3 years ago
Short Description
Utility to create a yum repository from an RPMS/ build directory and push it to an S3 bucket that you can then access from anywhere.
Full Description


This container will create a yum repository from an RPMS directory and upload the contents to an Amazon S3 bucket. Set up your bucket as a static website and you have a yum repository that you can access from anywhere.


The container expects RPMS to live at:


It also expects some environment variables:

  • ACCESS_KEY -- an Amazon IAM credential
  • SECRET_KEY -- an Amazon IAM credential
  • BUCKET_NAME -- the name of your Amazon S3 bucket

For example:

docker run --rm=true -ti --volumes-from=${BUILD_CONTAINER} \
  -e BUCKET_NAME=${YOUR_S3_BUCKET_NAME_HERE}               \
  -e ACCESS_KEY=$(cat .access_key)                         \
  -e SECRET_KEY=$(cat .secret_key)                         \

In this case the RPMS generated by my ${BUILD_CONTAINER} would be uploaded as a yum repository to my ${YOUR_BUCKET_NAME_HERE} S3 bucket. A yum .repo file to access the S3/Yum bucket might look like this:

name=My S3/yum repo - $basearch

AWS Policy

Upon running the container, the specified AWS credentials need access rights to the S3 bucket that's being sync'd to. You need to set these up beforehand (e.g. IAM console). Here's what I'm using:

  "Version": "2012-10-17",
  "Statement": [
      "Sid": "Stmt1405868503010",
      "Effect": "Allow",
      "Action": [
      "Resource": [
      "Sid": "Stmt1405868583000",
      "Effect": "Allow",
      "Action": [
      "Resource": [
Docker Pull Command
Source Repository