0

将fabric8添加到hello world pom后,在CentOS7上的Jenkins中运行maven“全新安装”时,

            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.31.0</version>
                <configuration>
                    <filter>${*}</filter>
                    <images>
                        <image>
                            <name>docker.io/myname/${project.artifactId}:${project.version}</name>
                        </image>
                    </images>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin> 

我收到以下错误

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.31.0:build (default) on project reference-service: Execution default of goal io.fabric8:docker-maven-plugin:0.31.0:build failed: An API incompatibility was encountered while executing io.fabric8:docker-maven-plugin:0.31.0:build: java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>io.fabric8:docker-maven-plugin:0.31.0

...

[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------: could not get native definition for type: POINTER: java.lang.UnsatisfiedLinkError: /tmp/jffi5159674609596634370.so: /tmp/jffi5159674609596634370.so: failed to map segment from shared object: Operation not permitted

我找不到 CentOS7 的 .so 文件的任何安装说明或其他说明。

GitHub 站点没有提供太多指导。

Docker 正在监听 2375 和 docker.sock。我正在构建的用户在 dockerroot 中。

保险丝同样的问题

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.23.0.fuse-730010-redhat-00001:build (default) on project reference-service: Execution default of goal io.fabric8:docker-maven-plugin:0.23.0.fuse-730010-redhat-00001:build failed: An API incompatibility was encountered while executing io.fabric8:docker-maven-plugin:0.23.0.fuse-730010-redhat-00001:build: java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
[ERROR] realm =    plugin>io.fabric8:docker-maven-plugin:0.23.0.fuse-730010-redhat-00001
4

1 回答 1

0

在这种情况下,FFI 错误意味着插件无法与 docker 守护进程对话。在全局 jenkins 配置中将 DOCKER_HOST 设置为 tcp://127.0.0.1:2375 解决了我的问题。

于 2019-12-10T14:48:34.353 回答