Next time, please share the text itself, instead of a screenshot of the text.
The option --no-cache still exists for docker compose build:
me@host:~$ docker compose build --help
Usage: docker compose build [OPTIONS] [SERVICE...]
Build or rebuild services
Options:
--build-arg stringArray Set build-time variables for services.
--no-cache Do not use cache when building the image
--progress string Set type of progress output (auto, tty, plain, quiet) (default "auto")
--pull Always attempt to pull a newer version of the image.
-q, --quiet Don't print anything to STDOUT
--ssh string Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)
Thanks, but I needed to pass the file flag since I am having two docker-compose.yml files as parameters… and i wanted to make sure that they were built without cache.
Every time I was typing docker compose build -f docker-compose.yml I was getting that error unknown shorthand flag: 'f' in -f, but I just got it now with docker compose -f /home/pi/docker-compose.yml build --no-cache
@meyay only talked about the --no-cache flag. -f is still a parameter of compose as it is required for all subcommand when you change the default compose file path. Some programs let you use the global options after the subcommands. I guess that was what confused you.