None of them builds images. Both files are just configurations. Dockerfile is to define the Docker image that you want to build. The compose file is to define the containers/services and you can refer to a Dockerfile if you want to run a container from an image that does not exist yet.
rimelek
(Ákos Takács)
3
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| What is difference between docker compose and Dockerfile? | 1 | 588 | January 15, 2020 | |
| Dockerfile or dockercompose? | 1 | 756 | February 5, 2019 | |
| Getting started. Some clarifications | 1 | 759 | February 9, 2017 | |
| Comparing docker compose yml with dab | 0 | 1840 | August 20, 2016 | |
| Docker-compose vs docker compose | 8 | 53193 | April 10, 2024 |