Jib爬坑

2018-07-11  本文已影响127人  tanoak

Google 在前两天开源了Jib,就想着是不是真的就像官网中说的那么牛X

  1. 准备一个java的demo,任意都行,本人使用maven,配置
<plugins>

      <plugin>
        <groupId>com.google.cloud.tools</groupId>
        <artifactId>jib-maven-plugin</artifactId>
        <version>0.9.2</version>
        <configuration>
          <to>
            <image>myimage</image>
          </to>
        </configuration>
      </plugin>
<image>标签可以选择以下任意一个
首选是
<image>gcr.io/my-gcp-project/my-app</image>

<image>aws_account_id.dkr.ecr.region.amazonaws.com/my-app</image>

<image>registry.hub.docker.com/my-docker-id/my-app</image>
  1. 项目首先mvn install 下载到本地仓库
    然后 mvn compile jib:build
    出现如下错误:
    maven的log提示“ Connect to gcr.io/74.125.204.82:443 timed out ”连接不上,完成整log如下
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.2:build (default-cli) on project jib-demo: Build image failed: Connect to gcr.io/74.125.204.82:443 timed out -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

我大天朝的网络还真不是盖的,没法子,使用VPN发现蓝灯这个梯子不怎么好使,还是没辙,大家梯子推荐一下吗?谢谢哈
github jib地址

上一篇下一篇

猜你喜欢

热点阅读