Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
FROM ubuntu
MAINTAINER Eystein Måløy Stenberg <eytein.stenberg@gmail.com>
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -y install wget lsb-release unzip
RUN ["apt-get", "update"]
RUN ["apt-get", "install", "-y", "wget", "unzip", "ca-certificates"]

# install latest CFEngine
RUN wget -qO- http://cfengine.com/pub/gpg.key | apt-key add -
RUN echo "deb http://cfengine.com/pub/apt $(lsb_release -cs) main" > /etc/apt/sources.list.d/cfengine-community.list
RUN apt-get update
RUN apt-get install cfengine-community
RUN echo "deb http://cfengine.com/pub/apt/packages stable main" > /etc/apt/sources.list.d/cfengine-community.list
RUN ["apt-get", "update"]
RUN ["apt-get", "install", "-y", "cfengine-community"]

# install cfe-docker process management policy
RUN wget --no-check-certificate https://github.com/estenberg/cfe-docker/archive/master.zip -P /tmp/ && unzip /tmp/master.zip -d /tmp/
RUN cp /tmp/cfe-docker-master/cfengine/bin/* /var/cfengine/bin/
RUN cp /tmp/cfe-docker-master/cfengine/inputs/* /var/cfengine/inputs/
RUN rm -rf /tmp/cfe-docker-master /tmp/master.zip
# install cfe-docker process management policy, from files in this directory
COPY cfengine /var/cfengine

# -- Alternately get them from another repo
#RUN wget https://github.com/estenberg/cfe-docker/archive/master.zip -P /tmp/ && unzip /tmp/master.zip -d /tmp/
#RUN cp /tmp/cfe-docker-master/cfengine/bin/* /var/cfengine/bin/
#RUN cp /tmp/cfe-docker-master/cfengine/inputs/* /var/cfengine/inputs/
#RUN rm -rf /tmp/cfe-docker-master /tmp/master.zip

# apache2 and openssh are just for testing purposes, install your own apps here
RUN apt-get -y install openssh-server apache2
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server apache2
RUN ["apt-get", "install", "-y", "openssh-server", "apache2"]
RUN mkdir -p /var/run/sshd
RUN echo "root:password" | chpasswd # need a password for ssh

ENTRYPOINT ["/var/cfengine/bin/docker_processes_run.sh"]