nzbhydra2/misc/buildLinuxCore/amd64/dockerfile
2024-03-23 14:04:41 +01:00

34 lines
1.5 KiB
Plaintext

# alpine doesn't work because we need libgc for the native image
FROM ubuntu:18.04
# See https://octopus.com/blog/using-ubuntu-docker-image
RUN echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/00-docker
RUN echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf.d/00-docker
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y zip unzip wget curl libfreetype6 libfreetype6-dev build-essential ca-certificates
RUN wget -nv --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -P /tmp
RUN tar xf /tmp/apache-maven-*.tar.gz -C /opt
RUN ln -s /opt/apache-maven-3.9.6 /opt/maven
ENV M2_HOME=/opt/maven
ENV MAVEN_HOME=/opt/maven
ENV PATH=${M2_HOME}/bin:${PATH}
RUN wget -nv --no-check-certificate https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-22.0.0/graalvm-community-jdk-22.0.0_linux-x64_bin.tar.gz
RUN tar xzf graalvm-community-jdk-22.0.0_linux-x64_bin.tar.gz -C /
ENV PATH=/graalvm-community-openjdk-22+36.1/bin/:$PATH
ENV JAVA_HOME=/graalvm-community-openjdk-22+36.1
# When you update this also change the directory in buildInContainer.sh
RUN wget -nv --no-check-certificate https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-amd64_linux.tar.xz
RUN tar -xf upx-4.2.2-amd64_linux.tar.xz
ENV PATH=/tmp/upx-4.2.2-amd64_linux/:$PATH
ENV HYDRA_NATIVE_BUILD=true
COPY buildInContainer.sh /
ENTRYPOINT /buildInContainer.sh
# To debug docker run --rm -it --entrypoint bash hydrabuild
# or for a running container docker exec -it <container-name-or-id> bash