我正在用碼頭構成一盞燈。訂購構建嵌套泊塢窗圖像與撰寫
以我搬運工-compose.yml我有以下:
ubuntu-base:
build: ./ubuntu-base
webserver-base:
build: ./webserver-base
網絡服務器基從Ubuntu的基本圖像的。 在網絡服務器基Dockerfile:
FROM docker_ubuntu-base
Ubuntu的基礎是建立
FROM ubuntu:14.04
現在,如果我執行泊塢窗,compose.yml,它不建立Ubuntu的基本圖像,但其試圖構建基於web服務器的映像並失敗,因爲它找不到基於ubuntu的映像。
輸出:
$ docker-compose up -d
Building webserver-base
Step 1 : FROM docker_ubuntu-base
Pulling repository docker.io/library/docker_ubuntu-base
ERROR: Service 'webserver-base' failed to build: Error: image library/docker_ubuntu-base:latest not found
這一切,如果我建立Ubuntu的基本圖像手動第一作品。
爲什麼不構建基於ubuntu的映像?
嗨,謝謝你的提示。今天是2016年,你有沒有找到更好的方法? – woto
更新了我的答案 – cari
嗯,可能由於我被誤解了,但depends_on不會影響構建順序。我會稍後再嘗試,在這個功能中仍然很有趣。 – woto