summaryrefslogtreecommitdiff
path: root/packaging/docker
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/docker')
-rw-r--r--packaging/docker/README16
-rw-r--r--packaging/docker/base-debian:jessie/Dockerfile4
-rw-r--r--packaging/docker/build.sh5
-rw-r--r--packaging/docker/catlfish-dev/Dockerfile25
-rw-r--r--packaging/docker/catlfish-dev/supervisord.conf5
-rw-r--r--packaging/docker/erlang/Dockerfile13
6 files changed, 68 insertions, 0 deletions
diff --git a/packaging/docker/README b/packaging/docker/README
new file mode 100644
index 0000000..24e7e1b
--- /dev/null
+++ b/packaging/docker/README
@@ -0,0 +1,16 @@
+Requirements:
+- lack of expectations regarding security -- docker doesn't verify
+ downloaded images
+- a 64-bit debian or ubuntu system
+- lxc-docker version 1.3 or later
+
+Build a docker image with catlfish:
+
+ $ ./build.sh
+
+The resulting image can be run in interactive mode by:
+
+ $ docker run -it --rm catlfish /bin/bash
+
+See catlfish/examples/docker-single-node/README for an example of how
+to set up a single node catlfish instance.
diff --git a/packaging/docker/base-debian:jessie/Dockerfile b/packaging/docker/base-debian:jessie/Dockerfile
new file mode 100644
index 0000000..1c248c0
--- /dev/null
+++ b/packaging/docker/base-debian:jessie/Dockerfile
@@ -0,0 +1,4 @@
+FROM debian:jessie
+RUN apt-get update
+RUN apt-get install -qq supervisor
+RUN mkdir -p /var/log/supervisor
diff --git a/packaging/docker/build.sh b/packaging/docker/build.sh
new file mode 100644
index 0000000..2b47222
--- /dev/null
+++ b/packaging/docker/build.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+docker build -t base base-debian:jessie
+docker build -t erlang erlang
+docker build -t catlfish catlfish-dev
diff --git a/packaging/docker/catlfish-dev/Dockerfile b/packaging/docker/catlfish-dev/Dockerfile
new file mode 100644
index 0000000..0326aea
--- /dev/null
+++ b/packaging/docker/catlfish-dev/Dockerfile
@@ -0,0 +1,25 @@
+FROM erlang
+RUN apt-get update
+RUN apt-get install -qq \
+ gcc \
+ git \
+ make
+
+WORKDIR /opt
+
+RUN git clone -b v2.9.2 https://github.com/mochi/mochiweb
+RUN make -C mochiweb
+
+RUN git clone -b 2.1.0 https://github.com/basho/lager
+RUN make -C lager
+
+RUN git clone -b 1.0.6-ndn-3 https://github.com/NORDUnet/hackney.git
+RUN make -C hackney REBAR=../lager/rebar
+
+RUN git clone https://git.nordu.net/plop.git
+RUN make -C plop
+
+RUN git clone https://git.nordu.net/catlfish.git
+RUN make -C catlfish all release
+
+ADD supervisord.conf /etc/supervisor/
diff --git a/packaging/docker/catlfish-dev/supervisord.conf b/packaging/docker/catlfish-dev/supervisord.conf
new file mode 100644
index 0000000..c973bff
--- /dev/null
+++ b/packaging/docker/catlfish-dev/supervisord.conf
@@ -0,0 +1,5 @@
+[supervisord]
+nodaemon=true
+
+[program:catlfish]
+command=/opt/catlfish/rel/bin/erl -config catlfish
diff --git a/packaging/docker/erlang/Dockerfile b/packaging/docker/erlang/Dockerfile
new file mode 100644
index 0000000..2212df6
--- /dev/null
+++ b/packaging/docker/erlang/Dockerfile
@@ -0,0 +1,13 @@
+FROM base
+RUN apt-get update
+RUN apt-get install -qq \
+ erlang-base \
+ erlang-crypto \
+ erlang-dev \
+ erlang-eunit \
+ erlang-inets \
+ erlang-public-key \
+ erlang-reltool \
+ erlang-runtime-tools \
+ erlang-ssl \
+ erlang-xmerl