Reputation: 1373
When I specify a compose file during build:
docker-compose build -f compose-production.yml
the images don't get built, and in stead I'm shown help-text:
$ docker-compose build -f compose-production.yml
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.
Anyone knows what's going on?
Upvotes: 5
Views: 4512
Reputation: 8527
Run with:
docker-compose -f compose-production.yml build
-f
is option for docker-compose
not option for command build
Upvotes: 20