我正在尝试按照此处的步骤在 podman 上构建一个用于开放自由的容器 - https://openliberty.io/guides/containerize-podman.html.
看起来 RUN features.sh 步骤失败,因为它无法访问互联网,但这是一个奇怪的错误。 我在这个容器上运行了 yum install nano 和curl www.google.com,它们都成功了。 为什么这些命令可以访问互联网,但features.sh却不能?
我得到的错误如下。 另外,为什么错误引用了maven而不是open liberty? 仅供参考,我在工作中运行此程序,因此涉及网络代理,但从我的桌面来看,代理是透明的。
C:\dev\rn-container\guide-containerize-podman>podman build -t system:1.0-SNAPSHOT finish/system/.
STEP 1/8: FROM icr.io/appcafe/open-liberty:kernel-slim-java11-openj9-ubi
Trying to pull icr.io/appcafe/open-liberty:kernel-slim-java11-openj9-ubi...
Getting image source signatures
Checking if image destination supports signatures
Copying blob sha256:9d876d7610f48b3b4c1fc2a7b9583ad2ec74b526b5a44beff535c389f61c5ee9
Copying blob sha256:930296e19327c9007bd33f3219bb4338cf8a3b20d3fc43c30f6b942cbdce6c51
Copying blob sha256:6d6997a1fd99ba362048be5d498f205f8961a46f7b22cccd6972848997207eff
Copying blob sha256:3df7dc3f800e252b9da6f53995188b66dedc36281d6bc79dfcd5c3b4259d80fc
Copying blob sha256:013e303ca13cc91712c179536acbef2617daafff1af96037ba3f76d363460cee
Copying blob sha256:0ed61360824d890ae6f7caa74dc073f686216d42734f5de00745b68163d12100
Copying blob sha256:8a9b1619fca84c174ec7fb46203df1149e93147e3a41d7ebcd2ead8fa4278a41
Copying blob sha256:c4f8bfb1b69f860bd698322a38d752d10d7d2ecb0334fcb343935919cda94264
Copying blob sha256:03a33c0a3305670f5f0538f25570d7f6a253b327a9594a1147aec3bdf718ab1a
Copying blob sha256:66e113d9641154158289e09d043c283cd915d1ac07d53b3c76defa208364bb4c
Copying blob sha256:46d83397f193bdbd259c17e6bf7724ce292ce19a7210f570b46ef8a7e3ddc308
Copying blob sha256:6018ccce72d419e19a2568fa66249d97a2d6be5fa3d212f9c997486f1088168c
Copying blob sha256:d3f6e09f7ceee9385c62fdbcbdfe5039b38e44814dd96eee4bb890ed59effa79
Copying blob sha256:27ba61511e7524f5bf78dc7747f3061b4271622b6be12bd0f352100ff76b637d
Copying blob sha256:0f79f8ed1c29c05a15adefcdf4b8747fa99fb615dc07b0e2689e872ec96a1a40
Copying blob sha256:46d0b4827a40eff712cab075bc04755781e783c322e6314d07c17600ce3c2cd8
Copying blob sha256:3777e08b6ba97f913814cd7528ae11e7f12e97dcc143d47c2c53f733f1a085f5
Copying config sha256:7f71d47dd47ee9a219206aa774a4398180139b2ebce10658e310bacbb42df06b
Writing manifest to image destination
Storing signatures
STEP 2/8: ARG VERSION=1.0
--> a6f2921a0454
STEP 3/8: ARG REVISION=SNAPSHOT
--> 59a154f1ae5f
STEP 4/8: LABEL org.opencontainers.image.authors="Your Name" org.opencontainers.image.vendor="Open Liberty" org.opencontainers.image.url="local" org.opencontainers.image.source="https://github.com/OpenLiberty/guide-containerize-podman" org.opencontainers.image.version="$VERSION" org.opencontainers.image.revision="$REVISION" vendor="Open Liberty" name="system" version="$VERSION-$REVISION" summary="The system microservice from the Containerizing microservices with Podman guide" description="This image contains the system microservice running with the Open Liberty runtime."
--> 6d5a73d3d417
STEP 5/8: COPY --chown=1001:0 src/main/liberty/config /config/
--> 1caaf3f0abeb
STEP 6/8: RUN features.sh
+ SNIPPETS_SOURCE=/opt/ol/helpers/build/configuration_snippets
+ SNIPPETS_TARGET=/config/configDropins/overrides
+ SNIPPETS_TARGET_DEFAULTS=/config/configDropins/defaults
+ mkdir -p /config/configDropins/overrides
+ mkdir -p /config/configDropins/defaults
+ '[' -n '' ']'
+ '[' '' == client ']'
+ '[' '' == embedded ']'
+ [[ -n '' ]]
+ '[' '' == true ']'
+ '[' '' == true ']'
+ featureUtility installServerFeatures --acceptLicense defaultServer --noCache
CWWKF1390E: The configured Maven Repository cannot be reached. Verify that your computer has network access and firewalls are configured correctly, then try the action again. If the connection still fails, the repository server might be temporarily unavailable.
featureUtility 从 Maven 存储库下载功能,如果未提供配置,则默认为 Maven Central。该消息引用 Maven 而不是 Open Liberty 的原因是它正在尝试连接到 Maven 存储库。我不知道您运行 Podman 构建的环境,但您可能在 Maven Central 被防火墙规则阻止的环境中运行它。很可能 Maven Central 被阻止,但 yum 存储库和 google 没有被阻止。一种快速测试方法是在容器中运行
curl https://repo1.maven.org/maven2/