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

Hi! quick question: is it possible to dynamically change the image’s arch based on the host’s machine instead of create 2 separate docker compose file?
Currently I have 2 files:
For arm64 (osx)
services:
typesense:
image: docker.io/typesense/typesense:0.25.2-arm64
container_name: typesense
restart: on-failure
ports:
- "8108:8108"
volumes:
- ./typesense-data:/data
command: '--data-dir /data --api-key=xyz --enable-cors'
For non arm64
services:
typesense:
image: docker.io/typesense/typesense:0.25.2
container_name: typesense
restart: on-failure
ports:
- "8108:8108"
volumes:
- ./typesense-data:/data
command: '--data-dir /data --api-key=xyz --enable-cors'
The only difference here is the image
, and ideally running them e.g. docker compose up -d
then let the engine decide which arch is appropriate in the host’s machine instead of using docker compose -f <FILE> up -d
.
Popular Cross Platform topics

I’ve been really enjoying obsidian.md:
It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New

VR, especially home VR via HMD’s has had a resurgance in the past 5-10 years, from being used for gaming with popular games like Beat Sab...
New

Redox is a Unix-like Operating System written in Rust, aiming to bring the innovations of Rust to a modern microkernel and full set of a...
New

Huh, this is interesting. Actually I’m especially interested by Revery as an Electron alternative. How is it coming along?
New

WezTerm is a GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Features
Runs on ...
New

Registration is now open for the online June 2021 FreeBSD Developer Summit. The event will consist of virtual, half day sessions, taking ...
New

Finally, a command
line shell for the 90s
fish is a smart and user-friendly command line
shell for Linux, macOS, and the rest of the fa...
New

https://tauri.studio/docs/about/intro
When I saw this I instantly thought of @OvermindDL1… Electron-killer? In Rust? Security-first? OK,...
New

New

Hi! quick question: is it possible to dynamically change the image’s arch based on the host’s machine instead of create 2 separate docker...
New
Other popular topics

I’ve been really enjoying obsidian.md:
It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New

Why, if your answer is yes?
New

I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me.
I think the Planck and the Preonic (o...
New

“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin
Even when you’re ultimately right about what the future ho...
New

Think Again 50% Off Sale »
The theme of this sale is new perspectives on familiar topics.
Enter coupon code ThinkAgain2021 at checkout t...
New

Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
New

Was just curious to see if any were around, found this one:
I got 51/100:
Not sure if it was meant to buy I am sure at times the b...
New

If you want a quick and easy way to block any website on your Mac using Little Snitch simply…
File > New Rule:
And select Deny, O...
New

Will Swifties’ war on AI fakes spark a deepfake porn reckoning?
New

This is cool!
DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON
We just witnessed something incredible: the largest open-s...
New
Latest in Cross Platform
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /flutter
- /preact
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /vuejs
- /nim
- /emacs
- /nerves
- /elm