From 740cbfd875d1abd414c8ad7af4a40b84a27f93df Mon Sep 17 00:00:00 2001 From: Frank Tornack Date: Sun, 29 Jan 2023 14:51:45 +0100 Subject: [PATCH] yacy is working in container --- docker/Dockerfile.ArchLinux | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker/Dockerfile.ArchLinux b/docker/Dockerfile.ArchLinux index 321321a65..5b5dcc965 100644 --- a/docker/Dockerfile.ArchLinux +++ b/docker/Dockerfile.ArchLinux @@ -64,3 +64,15 @@ mv yacy_search_server-master yacy && \ cd yacy && \ ant compile -f build.xml && \ rm -rf /opt/yacy/.github +# Set initial admin password: "yacy" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex()) +RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" /opt/yacy/defaults/yacy.init && \ + sed -i "/adminAccountForLocalhost=/c\adminAccountForLocalhost=false" /opt/yacy/defaults/yacy.init && \ + sed -i "/server.https=false/c\server.https=true" /opt/yacy/defaults/yacy.init +# add the yacy user +RUN useradd --no-create-home --system yacy && \ +usermod -L yacy && \ +chown -R yacy:yacy /opt/yacy +EXPOSE 8090 8443 +VOLUME ["/opt/yacy/DATA"] +USER yacy +CMD ["/bin/sh","/opt/yacy/startYACY.sh","-f"] \ No newline at end of file