question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to pass --platform linux/amd64 argument to docker start?

See original GitHub issue

I’d like to run an amd64 image on a M1 mac, but I didn’t find any way to pass the platform argument to docker.

This error I am getting is:

[WARNING] DOCKER> The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
[INFO] DOCKER> [stain/jena-fuseki:2.5.0]: Start container 7f1cca9206ea
[ERROR] DOCKER> IO Error while requesting logs: java.net.SocketException: Socket closed Thread-7
[ERROR] DOCKER> [stain/jena-fuseki:2.5.0]: Timeout after 8286 ms while waiting on log out '.*Started.*on port.*'
[ERROR] DOCKER> Error occurred during container startup, shutting down...

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
LeonardLaszlocommented, Mar 28, 2022

You can manually pull the image with --platform linux/amd64 parameters. Once the image exists locally it does not get pulled again, regardless of the architecture of the processor.

docker run --rm -ti --platform linux/amd64 stain/jena-fuseki:3.14.0

0reactions
LeonardLaszlocommented, Mar 24, 2022

But this makes sense, this config is for creating the image, but what I what to achieve is to run an existing amd64 image with rosetta on the arm64 CPU.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Forcing docker to use linux/amd64 platform by default on macOS
It seems to ignore both BUILDPLATFORM and TARGETPLATFORM. Is there any other way to force docker to run all build and run commands...
Read more >
Multi-Platform Docker Builds
By default, the Docker images we create run on the linux/amd64 platform. This works for the majority of development machines and cloud ...
Read more >
Faster Multi-Platform Builds: Dockerfile Cross-Compilation ...
In order to pass the target architecture, we can use the same automatically defined build arguments shown before, this time with TARGET* prefix....
Read more >
docker run - Docker Documentation
docker run : The `docker run` command first `creates` a writeable container layer over the specified image, and then `starts` it using the...
Read more >
Dockerfile reference - Docker Documentation
For example, linux/amd64 , linux/arm64 , or windows/amd64 . By default, the target platform of the build request is used. Global build arguments...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found