![](/img/trans.png)
[英]Why is docker-compose running the same command and using the wrong Dockerfile?
[英]Running docker-compose in a Dockerfile
現在在部署時接受 Dockerfile,但不接受 [docker-compose.yml 文件](問題編號),使用 docker-compose.yml 文件配置無人機。
基本上,我想知道您是否可以運行 docker-compose.yml 文件作為 Dockerfile 的一部分以及如何設置,目前我一直在嘗試這樣的事情:
FROM docker:latest
# add the docker-compose.yml file to the current working directory
WORKDIR /
ADD . /
# install docker-compose
RUN \
apk add --update --no-cache python3 && \
pip3 install docker-compose
RUN docker-compose up
以及上面的各種變體,在我嘗試啟動和運行時,在上述情況下,它抱怨 docker 守護程序沒有運行
非常感謝任何幫助,也歡迎其他實現上述最終結果的解決方案
Dockerfile 正在創建 docker 容器,並且在該容器中您正在使用 docker-compose
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.