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

doc: Enhance Docker platform specification in documentation #6029

Merged
merged 1 commit into from
Apr 7, 2024
Merged

doc: Enhance Docker platform specification in documentation #6029

merged 1 commit into from
Apr 7, 2024

Conversation

miry
Copy link
Contributor

@miry miry commented Mar 8, 2024

Description

Allow to run ghcr.io/synocommunity/spksrc from ARM machines:

$ docker run -it -v $(pwd):/spksrc -w /spksrc -e TAR_CMD="fakeroot tar" ghcr.io/synocommunity/spksrc /bin/bash

Unable to find image 'ghcr.io/synocommunity/spksrc:latest' locally
latest: Pulling from synocommunity/spksrc
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
See 'docker run --help'.

Workaround without this fix is to specify arch with --platform=linux/amd64:

$ docker run --platform=linux/amd64  -it -v $(pwd):/spksrc -w /spksrc -e TAR_CMD="fakeroot tar" ghcr.io/synocommunity/spksrc /bin/bash

P.S.: I tried to add platform, but there is some broken package installation for i386.

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

The current documentation lacks clarification on Docker platform specifications,
leading to errors when attempting to run the application on non-linux/amd64 machines.

       docker: no matching manifest for linux/arm64/v8 in the manifest list entries.

To ensure seamless execution on linux/arm architectures,
specify the appropriate platform in the Docker command line.
This adjustment aims to enhance the user experience and prevent potential issues.
@miry miry changed the title Build docker images for ARM machines Enhance Docker platform specification in documentation Mar 8, 2024
@miry miry marked this pull request as ready for review March 8, 2024 09:16
@miry miry changed the title Enhance Docker platform specification in documentation doc: Enhance Docker platform specification in documentation Mar 8, 2024
@hgy59
Copy link
Contributor

hgy59 commented Mar 8, 2024

@miry what is your intention with this PR?

spksrc is a framework to build packages for Synology DSM by using the toolchains provided by Synology.

It's about cross compilation of source code with the tools in the the toolchains for dedicated CPU architectures.
I.e. to build executables for ARM32, ARM64, PPC32, i386 (x86) and X64 (x86_64) targets.
But all those tools, like cross-compiler, cross-linker etc, are executables built for x86_64 CPUs, independent of the target architecture.

It will never work on platforms without x86_64 CPU.

@miry
Copy link
Contributor Author

miry commented Mar 8, 2024

@hgy59 Probably you saw my draft pr, so I removed my first version to support ARM docker image and keep only changes in documentation.
It helps to run docker image on arm machines and contribute to the project.
It should still allow to run and build x86_64 from inside docker from arm machines, because docker uses virtual machine in background for different platforms.

@hgy59 hgy59 merged commit 4b5795e into SynoCommunity:master Apr 7, 2024
@miry miry deleted the docker-arm branch April 7, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants