我正在学习码头工人
我需要为 docker 映像指定工作目录,我认为这将是这样的:
version: '2'
services:
test:
build:
context: ./dir
Now I want to make the image python:onbuild
to run on the ./dir
, but I dont want to create any Dockerfile
inside the ./dir
.
docker-compose
手册对此只字未提。
可能吗?怎么做?
原文由 Roomy 发布,翻译遵循 CC BY-SA 4.0 许可协议
我认为您正在寻找
working_dir
。在 docker-compose 参考 中搜索“working_dir”。