From 60756e603bc9d2e8ed3f4d1bb504682e789eeb00 Mon Sep 17 00:00:00 2001 From: luc Date: Wed, 11 May 2016 09:40:58 +0200 Subject: [PATCH 01/23] Added a Dockerfile The goal is to automate building of yacy docker image from latest commits. --- docker/Dockerfile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 docker/Dockerfile 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 From 7cb086714dd1d445c3455185ffbdf9d8b459b662 Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 11 May 2016 14:51:42 +0200 Subject: [PATCH 02/23] Try modifications for automated build on dockerhub --- docker/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 018cbd6f5..aa0b5485b 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,10 +12,13 @@ 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 +COPY ./yacy_search_server /opt/yacy_search_server + +# trace content of copied directory +RUN ls /opt/yacy_search_server # set current working dir to extracted sources directory -WORKDIR /opt/yacy_search_server-master +WORKDIR /opt/yacy_search_server # Compile with ant RUN ant clean compile @@ -27,7 +30,7 @@ RUN rm -rf .git EXPOSE 8090 # Set data volume : can be used to persist yacy data and configuration -VOLUME ["/opt/yacy_search_server-master/DATA"] +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-master/startYACY.sh -d \ No newline at end of file +CMD sh /opt/yacy_search_server/startYACY.sh -d From 5e2ded63aee1806438c9f30c121aa0d51c3b086e Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 11 May 2016 15:05:54 +0200 Subject: [PATCH 03/23] Corrected COPY instruction --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index aa0b5485b..7b896e834 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,7 +12,7 @@ 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 ./yacy_search_server /opt/yacy_search_server +COPY . /opt/yacy_search_server # trace content of copied directory RUN ls /opt/yacy_search_server From fe356d9da03c9dbab8d527a2845c57a7ae1933bf Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 11 May 2016 15:21:57 +0200 Subject: [PATCH 04/23] remove unused wget package dependency --- docker/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7b896e834..700df17be 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,8 +2,7 @@ FROM debian:latest # Install needed packages -RUN apt-get update && apt-get install -y \ - wget \ +RUN apt-get update && apt-get install -yq \ default-jdk \ ant From 474cf765d7d5f1d8503200dad201a43fa1f13185 Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 11 May 2016 17:22:01 +0200 Subject: [PATCH 05/23] Try for automated build compatibility on dockerhub --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 700df17be..9a0224bdc 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,7 +11,7 @@ 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 +COPY ./ /opt/yacy_search_server/ # trace content of copied directory RUN ls /opt/yacy_search_server From a784f214993ece98510892ebdd281b2f8b8c116e Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 11 May 2016 17:37:25 +0200 Subject: [PATCH 06/23] Moved Dockerfile to project root This is a try for automated build compatibility on Docker Hub --- Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..9a0224bdc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +# Base image : latest stable Debian +FROM debian:latest + +# Install needed packages +RUN apt-get update && apt-get install -yq \ + 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/ + +# trace content of copied directory +RUN ls /opt/yacy_search_server + +# set current working dir to extracted sources directory +WORKDIR /opt/yacy_search_server + +# 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/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 From 9b952e7d91c7bcaf7098e7a62759224297202762 Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 11 May 2016 17:38:24 +0200 Subject: [PATCH 07/23] Moved Dockerfile to project root This is a try for automated build compatibility with Docker Hub --- docker/Dockerfile | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100755 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100755 index 9a0224bdc..000000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# Base image : latest stable Debian -FROM debian:latest - -# Install needed packages -RUN apt-get update && apt-get install -yq \ - 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/ - -# trace content of copied directory -RUN ls /opt/yacy_search_server - -# set current working dir to extracted sources directory -WORKDIR /opt/yacy_search_server - -# 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/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 From 82d4ff08112bf6b808b1c7a25f70106a2978a2e0 Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 11 May 2016 17:46:50 +0200 Subject: [PATCH 08/23] Trace also hidden files in sources --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9a0224bdc..d3a42b079 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get clean COPY ./ /opt/yacy_search_server/ # trace content of copied directory -RUN ls /opt/yacy_search_server +RUN ls -la /opt/yacy_search_server # set current working dir to extracted sources directory WORKDIR /opt/yacy_search_server From e22a22c22f8e1adb6b2c4bd1d9fb0efa7c95edfb Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 11 May 2016 18:01:36 +0200 Subject: [PATCH 09/23] Try for automated build compatibility on dockerhub Remove (unnecessary?) clean in ant command --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d3a42b079..79fc1db0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN ls -la /opt/yacy_search_server WORKDIR /opt/yacy_search_server # Compile with ant -RUN ant clean compile +RUN ant compile # clean .git directory useless now RUN rm -rf .git From 8e758b12a58b9590849d870e77a6f2521f4e5eda Mon Sep 17 00:00:00 2001 From: luccioman Date: Thu, 12 May 2016 17:49:55 +0200 Subject: [PATCH 10/23] 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 From ee7cb575ea1ee64d9b5f492e86eeea64d91edd1e Mon Sep 17 00:00:00 2001 From: luccioman Date: Thu, 12 May 2016 17:50:21 +0200 Subject: [PATCH 11/23] Moved again Dockerfile to docker subdirectory --- Dockerfile | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 79fc1db0b..000000000 --- a/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# Base image : latest stable Debian -FROM debian:latest - -# Install needed packages -RUN apt-get update && apt-get install -yq \ - 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/ - -# trace content of copied directory -RUN ls -la /opt/yacy_search_server - -# set current working dir to extracted sources directory -WORKDIR /opt/yacy_search_server - -# Compile with ant -RUN ant 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/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 From a26f1b3cd749d336963967481b70e50659ec61e7 Mon Sep 17 00:00:00 2001 From: luccioman Date: Thu, 12 May 2016 18:07:39 +0200 Subject: [PATCH 12/23] save resource for unused blacklistFiles map (#1) --- htroot/Blacklist_p.html | 2 +- source/net/yacy/repository/Blacklist.java | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/htroot/Blacklist_p.html b/htroot/Blacklist_p.html index 2f7b6691f..6c032c2a3 100644 --- a/htroot/Blacklist_p.html +++ b/htroot/Blacklist_p.html @@ -163,7 +163,7 @@
- Settings for this list + Settings for this list #[currentBlacklist]#
diff --git a/source/net/yacy/repository/Blacklist.java b/source/net/yacy/repository/Blacklist.java index f1c11cfb0..0289ab86a 100644 --- a/source/net/yacy/repository/Blacklist.java +++ b/source/net/yacy/repository/Blacklist.java @@ -39,7 +39,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import java.util.TreeMap; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.regex.Pattern; @@ -99,7 +98,6 @@ public class Blacklist { } private File blacklistRootPath = null; - private Map blacklistFiles = new TreeMap(); private final ConcurrentMap cachedUrlHashs; private final ConcurrentMap>> hostpaths_matchable; // key=host, value=path; mapped url is http://host/path; path does not start with '/' here private final ConcurrentMap>> hostpaths_notmatchable; // key=host, value=path; mapped url is http://host/path; path does not start with '/' here @@ -170,7 +168,6 @@ public class Blacklist { for (final HandleSet entry : this.cachedUrlHashs.values()) { entry.clear(); } - blacklistFiles.clear(); } public final int size() { @@ -201,9 +198,6 @@ public class Blacklist { * @param sep */ private void loadList(final BlacklistFile blFile, final String sep) { - if (!blacklistFiles.containsKey(blFile.getType())) { - blacklistFiles.put(blFile.getType(), blFile.getFileName()); - } final Map> blacklistMapMatch = getBlacklistMap(blFile.getType(), true); final Map> blacklistMapNotMatch = getBlacklistMap(blFile.getType(), false); From 05565014daa6cdc67fe035504011334f98bb89ad Mon Sep 17 00:00:00 2001 From: luccioman Date: Thu, 12 May 2016 18:44:41 +0200 Subject: [PATCH 13/23] Initialize admin password from default or env --- docker/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 314289339..be0b9c474 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,6 +12,9 @@ RUN apt-get update && apt-get install -yq \ # set current working dir WORKDIR /opt +# initial admin password can be set through environment variable +ENV YACY_ADMIN_PASS docker + # 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 @@ -24,6 +27,9 @@ WORKDIR /opt/yacy_search_server # Compile with ant RUN ant compile +# Set admin password from env variable in yacy.init file +RUN sed -i "/adminAccount=/c\adminAccount=admin:$YACY_ADMIN_PASS" /opt/yacy_search_server/defaults/yacy.init + # make some cleaning to reduce image size RUN rm -rf .git && apt-get clean From 0b68fef7b5a131c31c5343a5e89c44c04ef28668 Mon Sep 17 00:00:00 2001 From: luc Date: Fri, 13 May 2016 13:35:38 +0200 Subject: [PATCH 14/23] Fixed initial admin password initialization --- docker/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index be0b9c474..0f1be4b83 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,9 +12,6 @@ RUN apt-get update && apt-get install -yq \ # set current working dir WORKDIR /opt -# initial admin password can be set through environment variable -ENV YACY_ADMIN_PASS docker - # 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 @@ -27,8 +24,8 @@ WORKDIR /opt/yacy_search_server # Compile with ant RUN ant compile -# Set admin password from env variable in yacy.init file -RUN sed -i "/adminAccount=/c\adminAccount=admin:$YACY_ADMIN_PASS" /opt/yacy_search_server/defaults/yacy.init +# Set initial admin password : "docker" +RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be4678605f4f4e6786" /opt/yacy_search_server/defaults/yacy.init # make some cleaning to reduce image size RUN rm -rf .git && apt-get clean From e0e19159e9cc86ebf294352da32727196720b23b Mon Sep 17 00:00:00 2001 From: luc Date: Fri, 13 May 2016 14:32:54 +0200 Subject: [PATCH 15/23] Added docker readme --- docker/Readme.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100755 docker/Readme.md diff --git a/docker/Readme.md b/docker/Readme.md new file mode 100755 index 000000000..8c938c807 --- /dev/null +++ b/docker/Readme.md @@ -0,0 +1,65 @@ +# Yacy Docker image from latest sources + +# Getting built image from Docker Hub + + docker pull luccioman/yacy + +Repository URL : (https://hub.docker.com/r/luccioman/yacy/) + +# Building image yourself + +Using yacy_search_server/docker/Dockerfile : + + cd yacy_search_server/docker + docker build . + +# Default admin account + +login : admin + +password : docker + +You should modify this default password with page /ConfigAccounts_p.html when exposing publicly your YaCy container. + +# Usage + +## First start + +### Most basic + + docker run luccioman/yacy + +YaCy web interface is then exposed at http://[container_ip]:8090. +You can retrieve the container IP address with `docker inspect`. + +### Easier to handle + + docker run --name yacy -p 8090:8090 luccioman/yacy + +--name option allow easier management of your container (without it, docker automatically generate a new name at each startup). + +-p option map host port and container port, allowing web interface access through the usual http://localhost:8090. + +### With persistent data volume + + docker run -v [your_host/data/directory]:/opt/yacy_search_server/DATA luccioman/yacy + +This allow your container to reuse a data directory form the host. + +### As background process + + docker run -d luccioman/yacy + +## Next starts + +### As attached process + + docker start -a yacy + +### As background process + + docker start yacy + +## Shutdown + +* Use "Shutdown" button in administration web interface \ No newline at end of file From 3a44ee74ba8089a54c30fd6e4d669e33f90e88c8 Mon Sep 17 00:00:00 2001 From: luc Date: Fri, 13 May 2016 14:34:02 +0200 Subject: [PATCH 16/23] Reduce docker image size --- docker/Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0f1be4b83..7f7fad6d1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,6 +6,7 @@ FROM debian:latest # Install needed packages RUN apt-get update && apt-get install -yq \ default-jdk \ + default-jre-headless \ ant \ git @@ -28,7 +29,12 @@ RUN ant compile RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be4678605f4f4e6786" /opt/yacy_search_server/defaults/yacy.init # make some cleaning to reduce image size -RUN rm -rf .git && apt-get clean +RUN rm -rf .git \ + && apt-get purge -yq \ + default-jdk \ + ant \ + git \ + && apt-get clean # Expose port 8090 EXPOSE 8090 From 1b189b06fcc2c9bc43eb1a531541837f223033fe Mon Sep 17 00:00:00 2001 From: luc Date: Fri, 13 May 2016 14:47:50 +0200 Subject: [PATCH 17/23] Try reducing even more final docker image size --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7f7fad6d1..96f75197f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -30,7 +30,7 @@ RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be # make some cleaning to reduce image size RUN rm -rf .git \ - && apt-get purge -yq \ + && apt-get purge -yq --auto-remove \ default-jdk \ ant \ git \ From e299782cb6e398b1fb0e4be3227c6b1ce5fda4c4 Mon Sep 17 00:00:00 2001 From: luccioman Date: Tue, 17 May 2016 21:56:06 +0200 Subject: [PATCH 18/23] Created a docker cloud stack file May be used for one click deploy on docker cloud (see https://docs.docker.com/docker-cloud/apps/deploy-to-cloud-btn/) --- docker/docker-cloud.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docker/docker-cloud.yml diff --git a/docker/docker-cloud.yml b/docker/docker-cloud.yml new file mode 100644 index 000000000..4ca23b0d6 --- /dev/null +++ b/docker/docker-cloud.yml @@ -0,0 +1,7 @@ +yacy: + image: 'luccioman/yacy:latest' + ports: + - '8090:8090' + restart: on-failure + volumes: + - /opt/yacy_search_server From 09584e8c21efc581940232b94dedbedb2eb3df17 Mon Sep 17 00:00:00 2001 From: luccioman Date: Tue, 17 May 2016 21:58:24 +0200 Subject: [PATCH 19/23] Improved titles levels --- docker/Readme.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docker/Readme.md b/docker/Readme.md index 8c938c807..e9ce21742 100755 --- a/docker/Readme.md +++ b/docker/Readme.md @@ -1,19 +1,19 @@ # Yacy Docker image from latest sources -# Getting built image from Docker Hub +## Getting built image from Docker Hub docker pull luccioman/yacy Repository URL : (https://hub.docker.com/r/luccioman/yacy/) -# Building image yourself +## Building image yourself Using yacy_search_server/docker/Dockerfile : cd yacy_search_server/docker docker build . -# Default admin account +## Default admin account login : admin @@ -21,18 +21,18 @@ password : docker You should modify this default password with page /ConfigAccounts_p.html when exposing publicly your YaCy container. -# Usage +## Usage -## First start +### First start -### Most basic +#### Most basic docker run luccioman/yacy YaCy web interface is then exposed at http://[container_ip]:8090. You can retrieve the container IP address with `docker inspect`. -### Easier to handle +#### Easier to handle docker run --name yacy -p 8090:8090 luccioman/yacy @@ -40,26 +40,26 @@ You can retrieve the container IP address with `docker inspect`. -p option map host port and container port, allowing web interface access through the usual http://localhost:8090. -### With persistent data volume +#### With persistent data volume docker run -v [your_host/data/directory]:/opt/yacy_search_server/DATA luccioman/yacy This allow your container to reuse a data directory form the host. -### As background process +#### As background process docker run -d luccioman/yacy -## Next starts +### Next starts -### As attached process +#### As attached process docker start -a yacy -### As background process +###" As background process docker start yacy -## Shutdown +### Shutdown -* Use "Shutdown" button in administration web interface \ No newline at end of file +* Use "Shutdown" button in administration web interface From b62ba0dc7cfa93a0130f07688467bd188d1ecdec Mon Sep 17 00:00:00 2001 From: luccioman Date: Tue, 17 May 2016 21:59:29 +0200 Subject: [PATCH 20/23] Fixed as background process title --- docker/Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Readme.md b/docker/Readme.md index e9ce21742..fce7912ba 100755 --- a/docker/Readme.md +++ b/docker/Readme.md @@ -56,7 +56,7 @@ This allow your container to reuse a data directory form the host. docker start -a yacy -###" As background process +#### As background process docker start yacy From adf3f29044cdd169ce789c1458086bdbf5c8addd Mon Sep 17 00:00:00 2001 From: luccioman Date: Tue, 17 May 2016 22:07:46 +0200 Subject: [PATCH 21/23] Added one-click docker cloud deploy --- docker/Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/Readme.md b/docker/Readme.md index fce7912ba..a49057d91 100755 --- a/docker/Readme.md +++ b/docker/Readme.md @@ -1,5 +1,7 @@ # Yacy Docker image from latest sources +[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=https://github.com/luccioman/yacy_search_server/tree/docker/docker) + ## Getting built image from Docker Hub docker pull luccioman/yacy From d74e781a2fce0cbe83fc33a7f224d4480d1619a3 Mon Sep 17 00:00:00 2001 From: luc Date: Fri, 20 May 2016 15:47:34 +0200 Subject: [PATCH 22/23] Enabled autoredeploy, removed useless volume - Autoredeploy allow dockercloud to redeploy container when a new image is pushed on dockerhub. - volume /opt/yacy_search_server/DATA is already declared in docker image and allow persistence of data inside deployed container. --- docker/docker-cloud.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/docker-cloud.yml b/docker/docker-cloud.yml index 4ca23b0d6..24a09a69b 100644 --- a/docker/docker-cloud.yml +++ b/docker/docker-cloud.yml @@ -3,5 +3,4 @@ yacy: ports: - '8090:8090' restart: on-failure - volumes: - - /opt/yacy_search_server + autoredeploy: true \ No newline at end of file From d45b19d07f029ec49865b647d0ae87b03a24872d Mon Sep 17 00:00:00 2001 From: luc Date: Sun, 22 May 2016 23:33:44 +0200 Subject: [PATCH 23/23] Detailed how default passord is encoded --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 96f75197f..476b266a4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,7 +25,7 @@ WORKDIR /opt/yacy_search_server # Compile with ant RUN ant compile -# Set initial admin password : "docker" +# Set initial admin password : "docker" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex()) RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be4678605f4f4e6786" /opt/yacy_search_server/defaults/yacy.init # make some cleaning to reduce image size