Reputation: 331
What is the equivalent of docker build --pull . in a docker-compose?
The docker compose reference only indicates build context, build file, and build args, but I can't find syntax to specify build options inside a docker compose.
Upvotes: 4
Views: 6152
Reputation: 263906
It's the same 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.
Upvotes: 5