我已经用Python开发了一个主要的raspberry pi应用程序,它使用Redis作为其本地缓存,因此我自然转向docker compose来定义我的所有服务,即Redis和我的应用程序。我正在使用Docker Hub专用存储库托管我的容器。但是我不知道如何使用docker buildx bake
命令以linux/armv7平台为目标,因为--platform
标志不是bake
的一部分
Docker团队展示的所有示例都使用简单的docker buildx
命令,该命令不能用于编写文件
我的docker-compose.yml文件定义为:
version: '3.0'
services:
redis:
image: redis:alpine
app:
image: dockerhub/repository
build: gateway
restart: always
Dockerfile:
# 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 [ "python", "-u", "run.py" ]
任何帮助都将不胜感激。谢谢
目前没有回答
相关问题 更多 >
编程相关推荐