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

Support platform in external docker-compose config #1786

Conversation

StasShymov
Copy link

@StasShymov StasShymov commented May 12, 2024

On Mac M1 docker-maven-plugin when using external docker-compose.yml configuration produces the following error:

I/O Error: Unable to create container for [...] : {"message":"image with reference ... was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64"} (Not Found: 404)

The solution is to add platform declaration to each service image:

services:
  alias1:
    image: host/org/image:1.0.0
    platform: linux/amd64

which overrides the native platform value linux/arm64 used by default. Unfortunately, the platform field in docker-compose config was ignored. This PR fixes that.

PS: Virtualization on Mac allows running amd64 build images.

@StasShymov StasShymov force-pushed the support-platform-in-external-docker-compose-config branch from db516e4 to bd6e3f2 Compare May 14, 2024 07:46
@rohanKanojia
Copy link
Member

@StasShymov Thanks! Could you please add a line to doc/changelog.md regarding this change?

@StasShymov StasShymov force-pushed the support-platform-in-external-docker-compose-config branch 2 times, most recently from ca93bf9 to ced719f Compare May 15, 2024 19:05
@rohanKanojia
Copy link
Member

@StasShymov : Could you please address minor sonar code smells? Looks good to be merged.

Signed-off-by: Stanislav Shymov <stas.shimov@gmail.com>
@StasShymov StasShymov force-pushed the support-platform-in-external-docker-compose-config branch from ced719f to 52e5266 Compare May 17, 2024 12:13
Copy link

sonarcloud bot commented May 17, 2024

@rohanKanojia rohanKanojia merged commit 2652a6b into fabric8io:master May 18, 2024
18 checks passed
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.

None yet

2 participants