@ -1,14 +1,18 @@
FROM archlinux:latest
FROM archlinux:latest
# update the system and clean up
# update the system and clean up
RUN pacman -Syu --noconfirm && pacman -Scc --noconfirm
RUN pacman -Syu --noconfirm && pacman -Scc --noconfirm
RUN pacman -Sy java-runtime-common wget --noconfirm && pacman -Scc --noconfirm
RUN pacman -Sy java-runtime-common wget --noconfirm && pacman -Scc --noconfirm
# download latest version of graalvm and move it to /lib/jvm/java-{javaversion}-graalvm
# download latest version of graalvm and move it to /lib/jvm/java-{javaversion}-graalvm
RUN bash <( curl -sL https://get.graalvm.org/jdk) --no-progress && \
RUN bash <( curl -sL https://get.graalvm.org/jdk) --no-progress && \
JAVAVERSION = $( ls ./ | grep graalvm | cut -d'-' -f3 | sed 's/java//g' ) && \
JAVAVERSION = $( ls ./ | grep graalvm | cut -d'-' -f3 | sed 's/java//g' ) && \
mv ./graalvm-ce-java$JAVAVERSION -$( ls ./ | grep graalvm | cut -d'-' -f4) /lib/jvm/java-$JAVAVERSION -graalvm && \
mv ./graalvm-ce-java$JAVAVERSION -$( ls ./ | grep graalvm | cut -d'-' -f4) /lib/jvm/java-$JAVAVERSION -graalvm && \
archlinux-java set java-$JAVAVERSION -graalvm
archlinux-java set java-$JAVAVERSION -graalvm
# update the path variable
# update the path variable
ENV PATH = " /usr/lib/jvm/default/bin: ${ PATH } "
ENV PATH = " /usr/lib/jvm/default/bin: ${ PATH } "
# set the JAVA_HOME variable
# set the JAVA_HOME variable
ENV JAVA_HOME = "/usr/lib/jvm/default"
ENV JAVA_HOME = "/usr/lib/jvm/default"
WORKDIR /opt
WORKDIR /opt
@ -24,11 +28,14 @@ sh build.sh -f fetch.xml -Ddest=optional && \
sh build.sh -Ddist.dir= /opt/ant dist && \
sh build.sh -Ddist.dir= /opt/ant dist && \
cd .. && \
cd .. && \
rm -rf ant-src
rm -rf ant-src
# set the ANT_HOME variable
# set the ANT_HOME variable
ENV ANT_HOME = "/opt/ant"
ENV ANT_HOME = "/opt/ant"
# set the PATH variable
# set the PATH variable
ENV PATH = " /opt/ant/bin: ${ PATH } "
ENV PATH = " /opt/ant/bin: ${ PATH } "
RUN ant -f /opt/ant/fetch.xml -Ddest= system
RUN ant -f /opt/ant/fetch.xml -Ddest= system
# install the latest version dependencies of Yacy (copied from the official Dockerfile)
# install the latest version dependencies of Yacy (copied from the official Dockerfile)
RUN pacman -Sy imagemagick ruby qt5-tools qt5-doc gperf python xorg-server-xvfb ghostscript git qt5-svg qt5-xmlpatterns base-devel qt5-location qt5-sensors qt5-webchannel libwebp libxslt libxcomposite gst-plugins-base hyphen hyphen-en hyphen-de woff2 cmake --noconfirm && \
RUN pacman -Sy imagemagick ruby qt5-tools qt5-doc gperf python xorg-server-xvfb ghostscript git qt5-svg qt5-xmlpatterns base-devel qt5-location qt5-sensors qt5-webchannel libwebp libxslt libxcomposite gst-plugins-base hyphen hyphen-en hyphen-de woff2 cmake --noconfirm && \
pacman -Scc --noconfirm
pacman -Scc --noconfirm
@ -36,26 +43,31 @@ RUN useradd --no-create-home --shell=/bin/false build && \
usermod -L build
usermod -L build
USER build
USER build
WORKDIR /tmp
WORKDIR /tmp
# buid package for qt5-webkit from AUR
# buid package for qt5-webkit from AUR
RUN git clone https://aur.archlinux.org/qt5-webkit.git && \
RUN git clone https://aur.archlinux.org/qt5-webkit.git && \
cd qt5-webkit && \
cd qt5-webkit && \
MAKEFLAGS = " -j $( nproc) " makepkg --noconfirm && \
MAKEFLAGS = " -j $( nproc) " makepkg --noconfirm && \
cd ..
cd ..
USER root
USER root
# install the package
# install the package
RUN pacman -U --noconfirm /tmp/qt5-webkit/qt5-webkit*.pkg.tar.zst && \
RUN pacman -U --noconfirm /tmp/qt5-webkit/qt5-webkit*.pkg.tar.zst && \
rm -rf /tmp/qt5-webkit
rm -rf /tmp/qt5-webkit
USER build
USER build
# build package for wkhtmltopdf from AUR
# build package for wkhtmltopdf from AUR
RUN git clone https://aur.archlinux.org/wkhtmltopdf.git && \
RUN git clone https://aur.archlinux.org/wkhtmltopdf.git && \
cd wkhtmltopdf && \
cd wkhtmltopdf && \
MAKEFLAGS = " -j $( nproc) " makepkg --noconfirm --skippgpcheck && \
MAKEFLAGS = " -j $( nproc) " makepkg --noconfirm --skippgpcheck && \
cd ..
cd ..
USER root
USER root
# install the package
# install the package
RUN pacman -U --noconfirm /tmp/wkhtmltopdf/wkhtmltopdf*.pkg.tar.zst && \
RUN pacman -U --noconfirm /tmp/wkhtmltopdf/wkhtmltopdf*.pkg.tar.zst && \
rm -rf /tmp/wkhtmltopdf
rm -rf /tmp/wkhtmltopdf
WORKDIR /opt
WORKDIR /opt
# download the latest version of yacy
# download the latest version of yacy
RUN curl "https://codeload.github.com/yacy/yacy_search_server/zip/refs/heads/master" --output yacy.zip && \
RUN curl "https://codeload.github.com/yacy/yacy_search_server/zip/refs/heads/master" --output yacy.zip && \
pacman -S unzip --noconfirm && \
pacman -S unzip --noconfirm && \
@ -66,10 +78,12 @@ mv yacy_search_server-master yacy && \
cd yacy && \
cd yacy && \
ant compile -f build.xml && \
ant compile -f build.xml && \
rm -rf /opt/yacy/.github
rm -rf /opt/yacy/.github
# Set initial admin password: "yacy" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
# 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 && \
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 "/adminAccountForLocalhost=/c\adminAccountForLocalhost=false" /opt/yacy/defaults/yacy.init && \
sed -i "/server.https=false/c\server.https=true" /opt/yacy/defaults/yacy.init
sed -i "/server.https=false/c\server.https=true" /opt/yacy/defaults/yacy.init
# add the yacy user
# add the yacy user
RUN useradd --no-create-home --system yacy && \
RUN useradd --no-create-home --system yacy && \
usermod -L yacy && \
usermod -L yacy && \