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

**URL:** <https://forum.devtalk.com/t/docker-compose-dynamically-change-the-image-architecture-based-on-running-host-machine/155452>\
**Category:** Cross-Platform Questions/Help\
**Tags:** community, question, help-needed, docker\
**Created:** [17 May 2024 02:25 UTC](https://forum.devtalk.com/t/docker-compose-dynamically-change-the-image-architecture-based-on-running-host-machine/155452 "2024-05-17T02:25:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![faust](https://forum.devtalk.com/user_avatar/forum.devtalk.com/faust/32/6673_2.png) [@faust](https://forum.devtalk.com/u/faust)\
**Post date:** [19 May 2024 22:04 UTC](https://forum.devtalk.com/t/docker-compose-dynamically-change-the-image-architecture-based-on-running-host-machine/155452/4 "2024-05-19T22:04:47Z")

</div>

I haven’t tried it myself but I guess you can use environment variables

```auto
image: docker.io/typesense/${MY_VARIABLE}"

```

Then in your shell you declare a variable called MY\_VARIABLE according to your system

You can read more here:

> **[Ways to set environment variables with Compose](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-from-the-shell)**
>
> How to set, use, and manage environment variables with Compose

---

_[View the full topic](https://forum.devtalk.com/t/docker-compose-dynamically-change-the-image-architecture-based-on-running-host-machine/155452)._
