I want to deploy a quarkus builder image via a Dockerfile. We are behind a proxy, I set all the linux proxy settings in upper- and lowercase.
If I run the Dockerfile, I get an error message at the gu command to install the native image component. Here is the complete run statement in the Dockerfile:
# Install GraalVM
RUN curl -fsSL https://github.com/oracle/graal/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-linux-amd64-${GRAALVM_VERSION}.tar.gz > graalvm-ce-${GRAALVM_VERSION}.tar.gz && \
tar -xvf graalvm-ce-${GRAALVM_VERSION}.tar.gz && \
rm -f graalvm-ce-${GRAALVM_VERSION}.tar.gz && \
mv graalvm-ce-${GRAALVM_VERSION} /usr/lib/jvm/ && \
cd /usr/lib/jvm && \
ln -sfn graalvm-ce-${GRAALVM_VERSION} graalvm && \
alternatives --install /usr/bin/java java ${GRAALVM_HOME}bin/java 97
RUN printenv
RUN ${GRAALVM_HOME}bin/gu install native-image
It returns an error message containing that I have to set an http_proxy. Before that run statement I start a printenv statement, as I can see the http_proxy env variable is set.
Before and after that part of the dockerfile we download and install other stuff. That works.
The only thing that don't work is the gu statement.
Here is the returning log message:
Step 10/24 : RUN printenv
---> Running in e539ee727135
...
GRAALVM_HOME=/usr/lib/jvm/graalvm/
JAVA_HOME=/usr/lib/jvm/graalvm/
HTTP_PROXY=http://This-is-a:real@proxy.com:8080/
http_proxy=http://This-is-a:real@proxy.com:8080/
HTTPS_PROXY=http://This-is-a:real@proxy.com:8080/
https_proxy=http://This-is-a:real@proxy.com:8080/
GRAALVM_VERSION=19.2.1
...
Removing intermediate container e539ee727135
---> de3d463af567
Step 11/24 : RUN ${GRAALVM_HOME}bin/gu available
---> Running in d4a04b82279c
Downloading: Component catalog from www.graalvm.org
Error: Error downloading component catalog from https://www.graalvm.org/component-catalog/graal-updater-component-catalog.properties: Invalid argument or cannot assign requested address.
Please check your connection and proxy settings. If your machine is behind a proxy, environment variables (http_proxy, https_proxy, ...) must be set appropriately.
The command '/bin/sh -c ${GRAALVM_HOME}bin/gu install native-image' returned a non-zero code: 3