使用--pull选项构建Docker Compose

3
在docker-compose中,docker build --pull .的等效命令是什么?
Docker Compose参考文档只提供了构建上下文、构建文件和构建参数,但我找不到在docker-compose中指定构建选项的语法。
1个回答

5

这与docker-compose build --pull相同:

$ docker-compose build --help
Build or rebuild services.

Services are built once and then tagged as `project_service`,
e.g. `composetest_db`. If you change a service's `Dockerfile` or the
contents of its build directory, you can run `docker-compose build` to rebuild it.

Usage: build [options] [SERVICE...]

Options:
    --force-rm  Always remove intermediate containers.
    --no-cache  Do not use cache when building the image.
    --pull      Always attempt to pull a newer version of the image.

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接