Плагин сборки jib-докера Google: проблема с пользователем - PullRequest
0 голосов
/ 24 января 2019

Я использую инструменты 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

и попробуйте запустить образ докера Я получил ниже исключения

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'

Есть ли какое-нибудь решение?

...