Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
simplify alpine image
Mister_X09e60ea5c9e4
diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpineindex f5e973fd0..e0369fb1a 100644--- a/docker/Dockerfile.alpine+++ b/docker/Dockerfile.alpine@@ -7,84 +7,16 @@ FROM eclipse-temurin:17-alpineRUN java -version# Install needed packages not in base image-# (curl for sh scripts in /bin, and imagemagick,xvfb and ghostscript to enable PDF and image snapshot generation)-RUN apk add --no-cache curl imagemagick xvfb ghostscript--# --- Begin of wkhtmltopdf install : compile from sources because the wkhtmltopdf Alpine package is currently only on the Alpine edge branch--# set current working dir-WORKDIR /tmp--# set wkhtmltopdf version once in a environment variable-ENV WKHTMLTOPDF_VERSION 0.12.5--# Download and extract wkhtmltopdf sources-RUN curl -fSL https://github.com/wkhtmltopdf/wkhtmltopdf/archive/${WKHTMLTOPDF_VERSION}.tar.gz -o wkhtmltopdf-${WKHTMLTOPDF_VERSION}-src.tar.gz && \- tar xzf wkhtmltopdf-${WKHTMLTOPDF_VERSION}-src.tar.gz--# set current working dir-WORKDIR wkhtmltopdf-${WKHTMLTOPDF_VERSION}--# All in one step to reduce image size growth :-# - add packages necessary to build wkhtmltopdf from sources and then to run it-# - build wkhtmltopdf-# - create a symbolic link to the wkhtmltopdf executable at a path where YaCy is expecting it-# - remove the sources archive-# - remove the build packages-RUN apk update && \- apk add --no-cache g++ make qt5-qtbase-dev qt5-qtwebkit-dev qt5-qtsvg-dev qt5-qtxmlpatterns-dev libgcc libstdc++ musl qt5-qtbase qt5-qtbase-x11 qt5-qtsvg qt5-qtwebkit && \- qmake-qt5 -makefile && \- make && \- make install && \- rm -f /tmp/wkhtmltopdf-${WKHTMLTOPDF_VERSION}-src.tar.gz && \- apk del g++ make qt5-qtbase-dev qt5-qtwebkit-dev qt5-qtsvg-dev qt5-qtxmlpatterns-dev--# --- End of wkhtmltopdf install--# --- Begin of apache ant install : from binary distribution because ant is not in alpine packages--# set current working dir-WORKDIR /tmp--# set ant version once in a environment variable-ENV ANT_VERSION 1.10.5--# All in one step to reduce image size growth :-# - add gnupg package-# - get ant binary file from a mirror and PGP file signature from main repository-# - import gpg keys from main repository and verify binary file signature-# - extract binary, make /opt directory, move extracted ant to /opt/ant-# - remove archive and gnupg package-RUN apk update && \- apk add --no-cache gnupg && \- curl -fSL https://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz -o apache-ant-${ANT_VERSION}-bin.tar.gz && \- curl -fSL https://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz.asc -o apache-ant-${ANT_VERSION}-bin.tar.gz.asc && \- curl -fSL https://www.apache.org/dist/ant/KEYS | gpg --import && \- gpg --verify apache-ant-${ANT_VERSION}-bin.tar.gz.asc && \- tar xzf apache-ant-${ANT_VERSION}-bin.tar.gz && \- mkdir -p /opt && \- mv apache-ant-${ANT_VERSION} /opt/ant && \- rm -f apache-ant-${ANT_VERSION}-bin.tar.gz && \- apk del gnupg--# set ant required environment variables-ENV ANT_HOME /opt/ant-ENV PATH ${PATH}:/opt/ant/bin--# --- End of apache ant install+# (curl for sh scripts in /bin, imagemagick, xvfb, ghostscript, wkhtmltopdf, and apache-ant for building)+RUN apk add --no-cache curl imagemagick xvfb ghostscript wkhtmltopdf apache-ant# set current working dirWORKDIR /opt-# All in one step to reduce image size growth :-# - compile with apache ant-# - delete ant binary install-# copy sourcesCOPY . /opt/yacy_search_server/-RUN apk add --no-cache \- ant compile -f /opt/yacy_search_server/build.xml && \+RUN ant compile -f /opt/yacy_search_server/build.xml && \rm -rf /opt/yacy_search_server/.git && \rm -rf /opt/ant