What is the difference b / w docker image created by the docker-compose build vs docker build team?

When building a docker-compose build image, the image of the image is different if the image was built using docker-compose build vs docker build . Env has a different hostname.

What else? Why are the images different?

+6
source share
2 answers

There is no difference between the actual image that is created between docker-compose build and the "manual" docker build in terms of image content.

The difference is only in assigning a name / method to the build result, which docker-compose will automatically do for you. In addition, the docker-compose build is no different behind the scenes and just a wrapper for a regular docker build .

+2
source

In addition to the difference in names, there may be a difference in the resulting image if the layout options are different: the build section: docker-compose.yml and the command line parameters of the docker build command. For example, -build-args may be different.

+1
source

All Articles