Compose: Changes to `docker-compose.yml` are not automatically applied

Created on 26 Sep 2016  ·  3Comments  ·  Source: docker/compose

If I make changes to docker-compose.yml, such as command, these changes are not picked up automatically when using docker-compose run.

I'm able to force it to detect these changes by using docker-compose down -v --remove-orphans.

Any ideas why this isn't automatically applied?

Most helpful comment

Never mind, this is because run does not detect changes but up will

All 3 comments

Never mind, this is because run does not detect changes but up will

Weird, I also made some changes to docker-compose.yml, tried running docker-compose up but the changes did not get picked up.

The changes are:

ADD nginx_app.conf /etc/nginx/sites-enabled/
CMD systemctl reload nginx

@NinoSkopac If you make changes to your Dockerfile, you'll need to run docker-compose build again.

$ 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.

...
Was this page helpful?
0 / 5 - 0 ratings