summaryrefslogtreecommitdiff
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authorluc <luc@debianluc>2016-05-11 09:40:58 +0200
committerluc <luc@debianluc>2016-05-11 09:40:58 +0200
commit60756e603bc9d2e8ed3f4d1bb504682e789eeb00 (patch)
tree94282ad4ea1febd4cf213f94f765f638fb9581c1 /docker/Dockerfile
parent8c9684cc453780436d28ab0af7af03479a493e74 (diff)
Added a Dockerfile
The goal is to automate building of yacy docker image from latest commits.
Diffstat (limited to 'docker/Dockerfile')
-rwxr-xr-xdocker/Dockerfile33
1 files changed, 33 insertions, 0 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100755
index 000000000..018cbd6f5
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,33 @@
+# Base image : latest stable Debian
+FROM debian:latest
+
+# Install needed packages
+RUN apt-get update && apt-get install -y \
+ wget \
+ default-jdk \
+ ant
+
+# Clean apt cache
+RUN apt-get clean
+
+# copy context : should be a YaCy git repository (remote or locally cloned)
+# context can also be obtained from extracted sources archive, but version number will be default to 1.83/9000 when building
+COPY . /opt/yacy_search_server-master
+
+# set current working dir to extracted sources directory
+WORKDIR /opt/yacy_search_server-master
+
+# Compile with ant
+RUN ant clean compile
+
+# clean .git directory useless now
+RUN rm -rf .git
+
+# Expose port 8090
+EXPOSE 8090
+
+# Set data volume : can be used to persist yacy data and configuration
+VOLUME ["/opt/yacy_search_server-master/DATA"]
+
+# Start yacy ind debug mode (-d) to display console logs and to wait for yacy process
+CMD sh /opt/yacy_search_server-master/startYACY.sh -d \ No newline at end of file