简体   繁体   English

Quarkus graalvm 本机构建 dockerfile 安装失败

[英]Quarkus graalvm native build dockerfile installation fails

I want to deploy a quarkus builder image via a Dockerfile.我想通过 Dockerfile 部署一个 quarkus 构建器映像。 We are behind a proxy, I set all the linux proxy settings in upper- and lowercase.我们在代理后面,我将所有 linux 代理设置设置为大写和小写。

If I run the Dockerfile, I get an error message at the gu command to install the native image component .如果我运行 Dockerfile,我会在 gu 命令中收到一条错误消息来安装本机映像组件 Here is the complete run statement in the Dockerfile:这是 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.它返回一条错误消息,其中包含我必须设置 http_proxy。 Before that run statement I start a printenv statement, as I can see the http_proxy env variable is set.在运行语句之前,我启动了一个 printenv 语句,因为我可以看到设置了 http_proxy env 变量。
Before and after that part of the dockerfile we download and install other stuff.在 dockerfile 的那部分之前和之后,我们下载并安装其他东西。 That works.那个有效。

The only thing that don't work is the gu statement.唯一不起作用的是 gu 语句。

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

Found not really a solution, but a workaround.找到的不是真正的解决方案,而是一种解决方法。 I fetched the component manually and install it via local statement.我手动获取组件并通过本地语句安装它。 Here is the Dockerfile snippet to install the native build:这是用于安装本机构建的 Dockerfile 片段:

### Install GraalVM native build
RUN curl -fsL -o component.jar https://github.com/oracle/graal/releases/download/vm-${GRAALVM_VERSION}/native-image-installable-svm-linux-amd64-${GRAALVM_VERSION}.jar && \
    ${GRAALVM_HOME}bin/gu install -L component.jar && \
    rm component.jar

That works.那个有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM