Actually build and push the RVM-based images
This commit is contained in:
parent
b18c5654e7
commit
d27c009e8c
|
@ -1,10 +1,9 @@
|
|||
FROM ubuntu:trusty
|
||||
|
||||
# Grab the bare necessities for installing RVM and some Rubies
|
||||
RUN apt-get update && apt-get install -yq git build-essential curl gnupg
|
||||
# Accept mpapis' key so we can safely install RVM
|
||||
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
|
||||
# Grab the latest stable version of RVM
|
||||
RUN curl -sSL https://get.rvm.io | bash -s stable
|
||||
RUN apt-get update && \
|
||||
apt-get install -yq git build-essential curl gnupg && \
|
||||
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 && \
|
||||
curl -sSL https://get.rvm.io | bash -s stable
|
||||
|
||||
COPY rvmrc /root/.rvmrc
|
||||
|
|
13
README.adoc
13
README.adoc
|
@ -3,3 +3,16 @@
|
|||
This repository contains some `Dockerfile` code for building containers which
|
||||
come pre-baked with RVM for builds and tests in
|
||||
link:https://jenkins.io[Jenkins].
|
||||
|
||||
|
||||
== Tags
|
||||
|
||||
The `rtyler/rvm` image alone is simply `ubuntu:trusty` with the latest stable
|
||||
link:http://rvm.io[RVM] installed on it. There are however additional tags with Rubies
|
||||
pre-installed:
|
||||
|
||||
* `rtyler/rvm:2.3.0` - Ruby (MRI) 2.3.0
|
||||
* `rtyler/rvm:jruby` - JRuby, whichever version RVM aliases to
|
||||
* `rtyler/rvm:ruby-head` - Ruby (MRI)'s latest `HEAD` at the time of image
|
||||
creation
|
||||
* `rtyler/rvm:rubinius` - Rubinius
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
source ./rubies
|
||||
|
||||
mkdir -p work
|
||||
|
||||
for RUBY in "${RUBIES[@]}"; do
|
||||
DOCKERFILE="work/dockerfile-${RUBY}"
|
||||
cat > $DOCKERFILE <<EOF
|
||||
FROM rtyler/ci-rvm:latest
|
||||
|
||||
RUN bash -c 'source /usr/local/rvm/scripts/rvm && rvm install ${RUBY}'
|
||||
EOF
|
||||
|
||||
echo "> Making ${IMAGE_TAG}:${RUBY}"
|
||||
docker build --tag="${IMAGE_TAG}:${RUBY}" --file="${DOCKERFILE}" work
|
||||
|
||||
if [ -f "${DOCKERFILE}" ]; then
|
||||
rm -f $DOCKERFILE
|
||||
fi;
|
||||
done;
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
source ./rubies
|
||||
|
||||
for RUBY in "${RUBIES[@]}"; do
|
||||
echo "> Pushing ${IMAGE_TAG}:${RUBY}"
|
||||
docker push ${IMAGE_TAG}:${RUBY}
|
||||
done;
|
Loading…
Reference in New Issue