Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image build failed on aarch64 chip #26775

Closed
Pace2Car opened this issue Jul 5, 2023 · 5 comments
Closed

Docker image build failed on aarch64 chip #26775

Pace2Car opened this issue Jul 5, 2023 · 5 comments

Comments

@Pace2Car
Copy link
Contributor

Pace2Car commented Jul 5, 2023

Hi community,

spotify:dockerfile-maven-plugin(https://github.com/spotify/dockerfile-maven) has been out of maintenance for many years, need to upgrade its dependency to a version that supports aarch64.

backtrace

[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (shardingsphere-proxy-bin) on project shardingsphere-test-e2e-fixture: Could not build image: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.lang.UnsatisfiedLinkError: could not load FFI provider com.spotify.docker.client.shaded.jnr.ffi.provider.jffi.Provider: ExceptionInInitializerError: Can't overwrite cause with java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /private/var/folders/hw/rk2827v92hj2g7fq1p_v8jp40000gn/T/jffi591738434175491320.dylib: dlopen(/private/var/folders/hw/rk2827v92hj2g7fq1p_v8jp40000gn/T/jffi591738434175491320.dylib, 0x0001): tried: '/private/var/folders/hw/rk2827v92hj2g7fq1p_v8jp40000gn/T/jffi591738434175491320.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/hw/rk2827v92hj2g7fq1p_v8jp40000gn/T/jffi591738434175491320.dylib' (no such file), '/private/var/folders/hw/rk2827v92hj2g7fq1p_v8jp40000gn/T/jffi591738434175491320.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64'))

The dependencies that need to be added are defined as:

<plugin>
    <groupId>com.spotify</groupId>
    <artifactId>dockerfile-maven-plugin</artifactId>
    <version>${dockerfile-maven.version}</version>
    <dependencies>
        <dependency>
            <groupId>com.github.jnr</groupId>
            <artifactId>jnr-unixsocket</artifactId>
            <version>0.38.20</version>
        </dependency>
        <dependency>
            <groupId>com.spotify</groupId>
            <artifactId>docker-client</artifactId>
            <classifier>shaded</classifier>
            <version>8.14.5</version>
        </dependency>
    </dependencies>
</plugin>

After this, the current problem can be resolved.However, if the version of docker-client drops to 8.14.5, it will face some known issues:

In the long run, we should try some other docker plugins, there are currently two popular plugins that can be taken into consideration:

However, the replacement will involve a lot of configuration modification, which needs to be evaluated.

@Pace2Car
Copy link
Contributor Author

Pace2Car commented Jul 5, 2023

Refer to: spotify/dockerfile-maven#394

@Pace2Car
Copy link
Contributor Author

Pace2Car commented Jul 5, 2023

Refer to: apache/airavata-custos#374

@TeslaCN
Copy link
Member

TeslaCN commented Jul 10, 2023

There is a temporary solution https://blog.csdn.net/wu_weijie/article/details/120630608

@Pace2Car
Copy link
Contributor Author

There is a temporary solution https://blog.csdn.net/wu_weijie/article/details/120630608

Thanks, this solved the problem I'm currently having

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.

@github-actions github-actions bot added the stale label Aug 9, 2023
@Pace2Car Pace2Car closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants