Skip to content

Commit

Permalink
Add a Dockerfile to simplify build process
Browse files Browse the repository at this point in the history
Also, conflict with conduit >= 0.14, as the installation scripts seem to
be rather buggy.
  • Loading branch information
talex5 committed Dec 31, 2016
1 parent 721c0a4 commit 427357c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ server/Makefile
server/cuekeeper_libvirt.xml
server/main.ml
server/main.native
server/cuekeeper.xl.in
server/mir-cuekeeper
server/static.ml
server/static1.ml*
server/log
server/conf/server.pem
server/conf/server.key
server/conf
server/devices.ml
cuekeeper-bin-*
cuekeeper-bin-*.zip
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM debian:stretch
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install aspcud zip m4 autoconf opam build-essential gcc-multilib ca-certificates git rsync --no-install-recommends
RUN opam init --comp=4.04.0+32bit
RUN opam pin add -n reactiveData https://github.com/hhugo/reactiveData.git
ADD opam /home/opam/cuekeeper/opam
WORKDIR /home/opam/cuekeeper
RUN opam pin add -n -y cuekeeper .
RUN opam install -y mirage-types-lwt mirage-http ocamlbuild 'conduit=0.13.0'
RUN opam install -y --deps-only cuekeeper
ENTRYPOINT ["opam", "config", "exec", "--"]
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ release:
zip -r "${RELEASE_DIR}.zip" ${RELEASE_DIR}
rm -rf "${RELEASE_DIR}"

docker-build:
docker build -t cuekeeper .
docker run --rm -v $(CURDIR):/home/opam/cuekeeper cuekeeper make

server/conf/server.key:
@echo Generating server key...
[ -d server/conf] || mkdir -p server/conf
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
CueKeeper
=========

Copyright Thomas Leonard, 2015
Copyright Thomas Leonard, 2016


Installation
------------
Installation (using Docker)
---------------------------

The easiest way to build CueKeeper is using Docker:

make docker-build

Then load `test.html` in a browser to test locally (no server required).


Installation (without Docker)
-----------------------------

You'll need the [opam](http://opam.ocaml.org/) package manager.
It should be available through your distribution, but you can use a [generic opam binary](http://tools.ocaml.org/opam.xml) if it's missing or too old (I use opam 1.2.2).
Expand Down
2 changes: 2 additions & 0 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ depends: [
"crunch" {build}
"ocamlfind" {build}
"mirage-http" {test}
"mirage-types-lwt" {test}
"ppx_sexp_conv"
"cstruct" {>= "1.7.0"}
]
Expand All @@ -38,4 +39,5 @@ depopts: [
]
conflicts: [
"mirage-xen-posix" {< "2.3.3"}
"conduit" {>= "0.14"}
]

0 comments on commit 427357c

Please sign in to comment.