Loading
Loading

Reputation: 1120

docker-compose flag to always rebuild docker container?

this is a part of my docker-compose file:

super-nice-service:
    build: ./Path/To/Dockerfile/

is there a flag i can add so this project is always getting rebuild whenever i do "docker-compose up" ?

Thanks

Upvotes: 0

Views: 888

Answers (1)

asolanki
asolanki

Reputation: 1373

There is no single command to do build and compose up you can try below, this will do a clean build of containers and bring the services up

docker-compose rm --all &&
 docker-compose pull &&
 docker-compose build --no-cache &&
 docker-compose up -d --force-recreate && 

Upvotes: 2

Related Questions