From 656b4444fff52e34e7132dbee10965c2dba0d2f1 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Tue, 17 Jan 2017 03:29:14 -0300 Subject: [PATCH] Moved from Debian Jessie to Alpine 3.5. Image shrinked from 161.6 MB to 30.93 MB. --- Dockerfile | 35 +++++++++++++++++++++++++++++------ README.md | 2 +- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 38a67f5..70e3d36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,31 @@ -FROM debian:jessie +FROM alpine:3.5 -RUN apt-get update -q -RUN DEBIAN_FRONTEND=noninteractive apt-get install -qy mcollective file -RUN apt-get clean -RUN rm -rf /var/lib/apt +RUN apk add --update ruby ruby-json ca-certificates wget +RUN gem install --no-rdoc --no-ri stomp + +RUN wget -q https://github.com/puppetlabs/marionette-collective/archive/2.9.1.tar.gz \ + -O mcollective.tar.gz +RUN tar xf mcollective.tar.gz +RUN mv /marionette-collective-2.9.1 mcollective + +RUN mkdir -p /etc/mcollective +RUN mkdir -p /usr/share/mcollective/plugins + +RUN cp /mcollective/etc/facts.yaml.dist /etc/mcollective/facts.yaml +RUN cp /mcollective/etc/*.erb /etc/mcollective + +RUN cp /mcollective/etc/server.cfg.dist /etc/mcollective/server.cfg +RUN cp /mcollective/etc/client.cfg.dist /etc/mcollective/client.cfg +RUN sed -i 's/^libdir *= *.*$/libdir = \/usr\/lib\/ruby\/vendor_ruby/g' /etc/mcollective/*.cfg + +RUN cp -r /mcollective/lib/* /usr/lib/ruby/vendor_ruby + +RUN cp /mcollective/bin/mcollectived /usr/sbin/ +RUN cp /mcollective/bin/mco /usr/bin/ + +RUN rm mcollective.tar.gz +RUN rm -rf mcollective +RUN rm -rf var/cache/apk/* + +ENTRYPOINT ["mcollectived", "--no-daemonize"] -CMD mcollectived --no-daemonize diff --git a/README.md b/README.md index b594b0e..b865f47 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # docker-mcollectived -Basic Debian with just mcollectived added. +Alpine with just mcollectived added.