Docker Compose: dynamically change the image architecture based on running host machine

@jaeyson The image that you’re using is already a multi-platform image. For example, it supports both linux/amd64 and linux/arm64.

Next, when you perform docker compose up -d, it will pull the image and run the appropriate platform variant for your host architecture without having to specify the platform. BTW, this is mentioned at the top of the page of the documentation link I sent in the previous post.

Finally, you can check the ‘Architecture’ and ‘Os’ of the running Docker image or container by doing the following:

docker inspect <container-id>

Or

docker inspect <your-image>

e.g.

docker inspect typesense/typesense:0.25.2

I hope that this helps and all the best.

1 Like