Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将兄弟目录复制到我的 docker 映像中,即类似于
ADD ../sibling_directory /usr/local/src/web/
这是不允许的——根据 Docker 文档,我的 Dockerfile 可访问的所有资源都必须位于 Dockerfile 工作目录下。
在我的场景中,我正在从一个公共代码库中将工作服务从 Web 服务中分离出来,我想先在逻辑上这样做,而不必实际物理分离代码。
以下是潜力的fig.yml样子:
fig.yml
web: build: ./web/ volumes: - /usr/local/src/web/ worker: build: ./worker/ volumes_from: - web