代码之家  ›  专栏  ›  技术社区  ›  NIrav Modi

google jib docker构建插件:用户问题

  •  0
  • NIrav Modi  · 技术社区  · 7 年前

    我正在使用google jib工具创建docker构建。

    <jib-maven-plugin.version>0.9.11</jib-maven-plugin.version>
    

    下面是我的插件配置

    <plugin>
                    <groupId>com.google.cloud.tools</groupId>
                    <artifactId>jib-maven-plugin</artifactId>
                    <version>${jib-maven-plugin.version}</version>
                    <configuration>
                        <from>
                            <image>openjdk:8-jre-alpine</image>
                        </from>
                        <to>
                            <image>nrvmodi/${project.artifactId}:${project.version}</image>
                        </to>
                        <container>
                            <entrypoint>
                                <shell>sh</shell>
                                <option>-c</option>
                                <arg>chmod +x /entrypoint.sh &amp;&amp; sync &amp;&amp; /entrypoint.sh</arg>
                            </entrypoint>
                            <ports>
                                <port>38099</port>
                            </ports>
                            <environment>
                                <SPRING_OUTPUT_ANSI_ENABLED>ALWAYS</SPRING_OUTPUT_ANSI_ENABLED>
                                <JHIPSTER_SLEEP>0</JHIPSTER_SLEEP>
                            </environment>   
                     <useCurrentTimestamp>true</useCurrentTimestamp>
                     <user>niravmodi</user>
                        </container>
                    </configuration>
                </plugin>
    

    当我使用下面的命令运行这个插件时

     ./mvnw package -Pprod verify -DskipTests jib:dockerBuild
    

    试着运行Docker镜像 我没有什么异常

    ERROR: for 1288bb956df9_nirav-service  Cannot start service ray-hub-service: b'linux spec user: unable to find user nirav: no matching entries in passwd file'
    

    有什么解决办法吗?

    0 回复  |  直到 7 年前
    推荐文章