Skip to content

Commit

Permalink
Moved from Debian Jessie to Alpine 3.5.
Browse files Browse the repository at this point in the history
Image shrinked from 161.6 MB to 30.93 MB.
  • Loading branch information
setanta committed Jan 17, 2017
1 parent 38b7730 commit 656b444
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
35 changes: 29 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# docker-mcollectived
Basic Debian with just mcollectived added.
Alpine with just mcollectived added.

0 comments on commit 656b444

Please sign in to comment.