I couldn't figure out what the difference between those.
docker-compose updocker-compose up --builddocker-compose build --no-cache
Is there any command for upwithout cache?
The following only builds the images, does not start the containers:
docker-compose buildThe following builds the images if the images do not exist and starts the containers:
docker-compose upIf you add the --build option, it is forced to build the images even when not needed:
docker-compose up --buildThe following skips the image build process:
docker-compose up --no-buildIf the images aren't built beforehand, it fails.
The --no-cache option disables the Docker build cache in the image creation process. This is used to cache each layer in the Dockerfile and to speed up the image creation reusing layers (~ Dockerfile lines) previously built for other images that are identical.
docker-compose up -d ?-d) for docker-compose up -d are not in the documentation for just docker-compose. You must look at docs.docker.com/compose/reference/up--build forces the (re-)build of the images. If you omit the flag and the image exists already, it won't get rebuilt.