title: How to use docker buildx bake to build docker compose containers for both linux/armv7 and linux/amd64
body: <p>I have developed a primarily raspberry pi app in Python that uses Redis as its local cache so naturally I turned to docker compose to define all my services i.e. redis and my app. I am using Docker Hub private repository to host my container. But I do not get how to use the <code>docker buildx bake</code> command to target linux/armv7 platform as <code>--platform</code> flag is not part of <code>bake</code></p>
  <p>All the examples that the Docker team has shown use the simple <code>docker buildx</code> command which cannot be run for compose files.</p>
  <p>My docker-compose.yml file is defined as:</p>
  <pre><code>version: '3.0'
  services:
    redis:
      image: redis:alpine
  
    app:
      image: dockerhub/repository
      build: gateway
      restart: always
  </code></pre>
  <p>Dockerfile:</p>
  <pre><code># set base image (Host OS)
  FROM python:3.8-slim
  
  # set the working directory in the container
  WORKDIR /run
  
  # copy the dependencies file to the working directory
  COPY requirements.txt .
  
  # install dependencies
  RUN pip install -r requirements.txt
  
  # copy the content of the local src directory to the working directory
  COPY src/ .
  
  # command to run on container start
  CMD [ &quot;python&quot;, &quot;-u&quot;, &quot;run.py&quot; ]
  </code></pre>
  <p>Any help would be much appreciated. Thanks</p>