diff --git a/Dockerfile-unison2.48.4-ocaml4.03 b/Dockerfile-unison2.48.4-ocaml4.03 new file mode 100644 index 0000000..08bf48c --- /dev/null +++ b/Dockerfile-unison2.48.4-ocaml4.03 @@ -0,0 +1,31 @@ +FROM phusion/baseimage:0.9.16 +CMD ["/sbin/my_init"] + +MAINTAINER Leigh McCulloch + +# Upload Unison for building +COPY container / + +# Allow setting these on build +ARG UNISON_VERSION=2.48.4 +ARG OCAML_VERSION=4.03 + +# Build and install Unison versions then cleanup +RUN apt-get update -y \ + && curl -LO http://download.opensuse.org/repositories/home:ocaml/xUbuntu_14.04/Release.key \ + && apt-key add - < Release.key \ + && apt-get update -y \ + && dependencies-install.sh \ + && unison-install.sh \ + && dependencies-purge.sh \ + && rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/* + +# Set default Unison configuration +ENV UNISON_WORKING_DIR=/unison + +# Set working directory to be the home directory +WORKDIR /root + +# Setup unison to run as a service +VOLUME $UNISON_WORKING_DIR +EXPOSE 5000 diff --git a/Makefile b/Makefile index 4a24509..25e3664 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ build: + sed -e "s/\$${UNISON_VERSION}/2.48.4/" -e "s/\$${OCAML_VERSION}/4.03/" Dockerfile > Dockerfile-unison2.48.4-ocaml4.03 sed -e "s/\$${UNISON_VERSION}/2.48.3/" -e "s/\$${OCAML_VERSION}/4.02/" Dockerfile > Dockerfile-unison2.48.3-ocaml4.02 sed -e "s/\$${UNISON_VERSION}/2.48.3/" -e "s/\$${OCAML_VERSION}/4.01/" Dockerfile > Dockerfile-unison2.48.3-ocaml4.01 sed -e "s/\$${UNISON_VERSION}/2.40.102/" -e "s/\$${OCAML_VERSION}/4.02/" Dockerfile > Dockerfile-unison2.40.102-ocaml4.02