diff options
author | KodApa85 <parsons151185@gmail.com> | 2018-04-13 20:30:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-13 20:30:43 +0100 |
commit | dbbe6af563072b62e373a9824c6a23482d20896e (patch) | |
tree | ab5341e8b1cd37aa0abf54662714f272cd8f9633 /Dockerfile | |
parent | 97aa0535a0c8c237c1ccb7a1683d5f6faa1f0339 (diff) | |
parent | 56ec279b2e9e2735ed88405fd177e77f9e376801 (diff) |
Merge branch 'master' into xgs4600-cli
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 56 |
1 files changed, 41 insertions, 15 deletions
@@ -1,11 +1,41 @@ -FROM phusion/baseimage:0.9.18 -MAINTAINER Samer Abdel-Hafez <sam@arahant.net> +# -- stage 1: backport libssh2 1.7.0 from zesty for xenial, as githubrepo hook requires it +FROM ubuntu:xenial as libssh2-backport + +# set up dependencies for the build process +RUN apt-get -yq update && \ + apt-get -yq install build-essential chrpath debhelper dh-autoreconf libgcrypt20-dev zlib1g-dev + +# build libssh2 1.7.0 +WORKDIR /tmp/libssh2-build +ADD https://launchpad.net/ubuntu/+archive/primary/+files/libssh2_1.7.0-1ubuntu1.debian.tar.xz . +ADD https://launchpad.net/ubuntu/+archive/primary/+files/libssh2_1.7.0.orig.tar.gz . +RUN tar xvf libssh2_1.7.0.orig.tar.gz +WORKDIR /tmp/libssh2-build/libssh2-1.7.0 +RUN tar xvf ../libssh2_1.7.0-1ubuntu1.debian.tar.xz + +WORKDIR /tmp/libssh2-build/libssh2-1.7.0 +ENV DEB_BUILD_OPTIONS nocheck +RUN dpkg-buildpackage -b + +# -- stage 2: build the actual oxidized container +FROM phusion/baseimage:0.10.0 +LABEL maintainer="Samer Abdel-Hafez <sam@arahant.net>" + +# set up dependencies for the build process +RUN apt-get -yq update && \ + apt-get -yq install ruby2.3 ruby2.3-dev libsqlite3-dev libssl-dev pkg-config make cmake libssh2-1-dev git g++ libffi-dev + +# upgrade libssh2 to self-built backport from stage 1 +COPY --from=libssh2-backport \ + /tmp/libssh2-build/libssh2-1_1.7.0-1ubuntu1_amd64.deb \ + /tmp/libssh2-build/libssh2-1-dev_1.7.0-1ubuntu1_amd64.deb \ + /tmp/ +RUN dpkg -i /tmp/*.deb -RUN add-apt-repository ppa:brightbox/ruby-ng && \ - apt-get update && \ - apt-get install -y ruby2.3 ruby2.3-dev libsqlite3-dev libssl-dev pkg-config make cmake libssh2-1-dev git g++ +# dependencies for hooks +RUN gem install aws-sdk slack-api xmpp4r -RUN mkdir -p /tmp/oxidized +# build and install oxidized COPY . /tmp/oxidized/ WORKDIR /tmp/oxidized @@ -15,17 +45,13 @@ RUN gem install oxidized-*.gem # web interface RUN gem install oxidized-web --no-ri --no-rdoc -# dependencies for hooks -RUN gem install aws-sdk -RUN gem install slack-api -RUN gem install xmpp4r - +# clean up +WORKDIR / RUN rm -rf /tmp/oxidized +RUN rm /tmp/*.deb +RUN apt-get -yq --purge autoremove ruby-dev pkg-config make cmake -RUN apt-get remove -y ruby-dev pkg-config make cmake - -RUN apt-get -y autoremove - +# add runit services ADD extra/oxidized.runit /etc/service/oxidized/run ADD extra/auto-reload-config.runit /etc/service/auto-reload-config/run ADD extra/update-ca-certificates.runit /etc/service/update-ca-certificates/run |