From 8e758b12a58b9590849d870e77a6f2521f4e5eda Mon Sep 17 00:00:00 2001 From: luccioman Date: Thu, 12 May 2016 17:49:55 +0200 Subject: [PATCH] Moved again Dockerfile to docker subdirectory --- docker/Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..314289339 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,37 @@ +# Build a docker image from latest YaCy sources + +# Base image : latest stable Debian +FROM debian:latest + +# Install needed packages +RUN apt-get update && apt-get install -yq \ + default-jdk \ + ant \ + git + +# set current working dir +WORKDIR /opt + +# clone main YaCy git repository (we need to clone git repository to generate correct version when building from source) +RUN git clone https://github.com/yacy/yacy_search_server.git + +# trace content of source directory +RUN ls -la /opt/yacy_search_server + +# set current working dir +WORKDIR /opt/yacy_search_server + +# Compile with ant +RUN ant compile + +# make some cleaning to reduce image size +RUN rm -rf .git && apt-get clean + +# Expose port 8090 +EXPOSE 8090 + +# Set data volume : can be used to persist yacy data and configuration +VOLUME ["/opt/yacy_search_server/DATA"] + +# Start yacy ind debug mode (-d) to display console logs and to wait for yacy process +CMD sh /opt/yacy_search_server/startYACY.sh -d