Scripts to create a Private Ruby Gem Server using AWS S3
1.9K
This script and Docker imager uploads gems to S3 and creates files which make it usable as Gem Server.
(out of scope here)
(out of scope here)
$ docker run --rm -v $(pwd):/workdir -e "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" -e "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" -e "AWS_BUCKET=$AWS_BUCKET" tmaier/s3-gemserver upload
$ docker run --rm -e "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" -e "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" -e "AWS_BUCKET=$AWS_BUCKET" tmaier/s3-gemserver update_index
This is the general idea. Rubygems supports S3, but Bundler is not there yet. See https://github.com/bundler/bundler/issues/4506 for details.
Set source to S3 bucket in Gemfile.
source 's3://my_bucket'
gem 'my_secret_gem'
Set access key and secret key using Bundler.
$ bundle config my_bucket $AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY
$AWS_DIRECTORY and upload the gems to that foldersource URL and path in the Gemfile$AWS_ACCESS_KEY_ID$AWS_SECRET_ACCESS_KEY$AWS_BUCKET$AWS_DIRECTORYFollowing blog posts influenced this script and Dockerfile.
Content type
Image
Digest
Size
33.3 MB
Last updated
over 8 years ago
docker pull tmaier/s3-gemserver