我想通过Dockerfile部署夸克构建器映像。我们在一个代理后面,我将所有linux代理设置设置为大写和小写。
如果运行Dockerfile,在gu命令处会收到安装本机映像组件的错误消息。以下是Dockerfile中完整的run语句:
# 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它返回一个错误消息,其中包含我必须设置一个http_proxy。在该run语句之前,我启动printenv语句,因为我可以看到设置了http_proxy env变量。
在该部分dockerfile之前和之后,我们下载并安装其他内容。这是可行的。
唯一不起作用的是gu语句.
以下是返回的日志消息:
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发布于 2019-12-17 15:03:51
找到的不是真正的解决办法,而是一种解决办法。我手动获取组件并通过本地语句安装它。下面是安装本机构建的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这是可行的。
https://stackoverflow.com/questions/59373855
复制相似问题