Build and test Omnibus in Docker
I think that we should migrate to Docker-based builds. This would allow us to easily scale the Omnibus infrastracture and also reliably build Raspberry PI images.
It came from idea that we could use rapsbian
docker image to build Omnibus. We can use resin/rpi-raspbian:wheezy
and resin/rpi-raspbian:jessie
which uses original Raspbian images from Raspberry PI Foundation. These images can be used to run builds on X86_64 (using qemu-user-arm
) or ARM (we can use for example Scaleway with their's LSSD drives).
Dockerfile for Omnibus RPI builds (put that in root of GitLab Omnibus directory):
FROM resin/rpi-raspbian:jessie
RUN apt-get update
RUN apt-get install git-core wget build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev ca-certificates
RUN cd /usr/src/ && \
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz && \
tar -xvzf ruby-2.2.2.tar.gz && \
cd ruby-2.2.2 && \
./configure --enable-shared --disable-install-doc --disable-install-rdoc --disable-install-capi && \
make install -j 3
RUN gem install bundler
ADD Gemfile* /usr/src/app/
WORKDIR /usr/src/app
RUN bundle install --binstubs --path ~/gems
ADD . /usr/src/app
RUN make build # run Omnibus Makefile
By changing resin/rpi-raspbian:jessie
to debian:jessie
, ubuntu:trusty
we can use the same Dockerfile to build it for X86_64.