Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Merge branch 'master' into master

Michael Christen84bb610f4be8
diff --cc docker/Dockerfile
index ca201b1f7,166b8669d..3967b0728
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@@ -6,39 -6,44 +6,31 @@@
# run with
# docker run -d --name yacy -p 8090:8090 -p 8443:8443 -v yacy_data:/opt/yacy_search_server/DATA --log-opt max-size=200m --log-opt max-file=2 yacy/yacy_search_server:latest
+
-## build base
-FROM eclipse-temurin:24-jdk-noble AS base
-RUN apt-get update && apt-get install -yq wkhtmltopdf imagemagick xvfb ghostscript && rm -rf /var/lib/apt/lists/*
-
-
-## build app
-FROM base AS appbuilder
-
-RUN apt-get update && apt-get install -yq ant git curl && rm -rf /var/lib/apt/lists/*
-RUN java -version
+## builder image
- FROM eclipse-temurin:21-jdk AS builder
- RUN apt-get update && apt-get install -y --no-install-recommends \
- ant \
- git \
- curl \
- && rm -rf /var/lib/apt/lists/*
++FROM eclipse-temurin:24-jdk-noble AS builder
++RUN apt-get update && apt-get install -y --no-install-recommends ant git curl && rm -rf /var/lib/apt/lists/*
++# compile YaCy
WORKDIR /opt
COPY . /opt/yacy_search_server/
-
-RUN ant compile -f /opt/yacy_search_server/build.xml && \
- apt-get purge -yq --auto-remove ant && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/*
--
-WORKDIR /opt/yacy_search_server/
-RUN git rev-parse HEAD > .git/shallow && \
- git tag -l | xargs git tag -d && \
- git gc --prune=now
+RUN ant compile -f /opt/yacy_search_server/build.xml
# Set initial admin password: "yacy" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
+# Intially enable HTTPS: this is the most secure option for remote administrator authentication
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" /opt/yacy_search_server/defaults/yacy.init && \
sed -i "/adminAccountForLocalhost=/c\adminAccountForLocalhost=false" /opt/yacy_search_server/defaults/yacy.init && \
sed -i "/server.https=false/c\server.https=true" /opt/yacy_search_server/defaults/yacy.init
-
-## build dist
-FROM base
+## build final image
- FROM eclipse-temurin:21-jre AS app
-
- RUN apt-get update && apt-get install -y --no-install-recommends \
- wkhtmltopdf \
- xvfb \
- ghostscript \
- && rm -rf /var/lib/apt/lists/*
-
++FROM eclipse-temurin:24-jdk-noble AS app
++RUN apt-get update && apt-get install -y --no-install-recommends wkhtmltopdf xvfb ghostscript && rm -rf /var/lib/apt/lists/*
LABEL maintainer="Michael Peter Christen <[email protected]>"
++# copy YaCy to app image
RUN adduser --system --group --no-create-home --disabled-password yacy
WORKDIR /opt
-COPY --chown=yacy:yacy --from=appbuilder /opt/yacy_search_server /opt/yacy_search_server
+COPY --chown=yacy:yacy --from=builder /opt/yacy_search_server /opt/yacy_search_server
EXPOSE 8090 8443
VOLUME ["/opt/yacy_search_server/DATA"]