Docker on Windows by Stoneman Elton

Docker on Windows by Stoneman Elton

Author:Stoneman, Elton [Stoneman, Elton]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2017-07-13T04:00:00+00:00


Managing application images

Docker Compose can manage Docker images as well as containers. In the Compose file, you can include attributes that tell Docker Compose how to build your images. You can specify the location of the build context to send to the Docker service, which is the root folder for all your application content—and the location of the Dockerfile.

The context path is relative to the location of the Compose file, and the Dockerfile path is relative to the context. This is very useful for complex source trees such as the demo source for this book, where the context for each image is in a different folder. In the ch06-docker-compose-build folder, I have a Compose file with all the build attributes specified.

This is how the build details are specified for my images:

nerd-dinner-db:

image: dockeronwindows/ch06-nerd-dinner-db

build:

context: ../ch06-nerd-dinner-db

dockerfile: ./Dockerfile

...



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.