Looks like I need some help. I was trying to implement cross platform build with GraalVM (the tool for statically compiling java code from Oracle)
While there is no problem with Visual Studio 2019 Build Tools, I'm not able to run any GraalVM compiled binaries.
GraalVM package includes internal tools like native-image.exe and gu.exe. They are actually GraalVM compiled binaries itself.
gu.exe installs vm components
Code: Select all
gu.exe install native-image
upd.
Steps To reproduce:
Build dockerfile below
Code: Select all
docker build -t graalvm-win .
Code: Select all
docker run -it graalvm-win bash -c "wine graalvm-ce-java17-22.0.0.2/lib/installer/bin/gu.exe -h"
Code: Select all
FROM ubuntu:21.10
RUN apt-get update \
&& apt-get install -y ca-certificates software-properties-common winbind curl unzip \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
RUN curl --fail --silent --location --retry 3 https://dl.winehq.org/wine-builds/winehq.key | apt-key add - \
&& add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main' \
&& dpkg --add-architecture i386 && apt-get update \
&& apt install -y --install-recommends xvfb winehq-devel \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
WORKDIR /opt
ARG GRAALVM_VERSION=22.0.0.2
ARG JAVA_VERSION=java17
ARG GRAALVM_ARCH=windows-amd64
ARG GRAALVM_PKG=https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-$GRAALVM_VERSION/graalvm-ce-$JAVA_VERSION-$GRAALVM_ARCH-$GRAALVM_VERSION.zip
ARG TARGETPLATFORM=linux/amd64
ENV LANG=en_US.UTF-8 \
JAVA_HOME=/opt/graalvm-ce-$JAVA_VERSION-$GRAALVM_VERSION
RUN curl --fail --silent --location --retry 3 ${GRAALVM_PKG} -o /opt/graalvm.zip && unzip -q /opt/graalvm.zip -d /opt && rm /opt/graalvm.zip
RUN wine64 wineboot --init && while pgrep wineserver > /dev/null; do sleep 1; done
CMD java -version