Google Jib Docker构建插件:用户问题

时间:2019-01-24 08:04:12

标签: docker jib

我正在使用Google臂架工具创建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 个答案:

没有答案