Inspecting the Stack File: Networks and Volumes
Examine the secrets, networks, and volumes section of the stack file.
We'll cover the following
Stack files are identical to Compose files, with a few differences at runtime. For example, Docker Compose lets you build images at runtime, but Docker stacks don’t. Let’s look at the networking elements defined in our stack file.
Networks and networking
One of the first things Docker does when you deploy an app from a stack file is create the networks listed under the networks
key. If they already exist, Docker doesn’t need to do anything. But if they don’t exist, it creates them.
This app defines a single encrypted overlay network called counter-net
.
Get hands-on with 1400+ tech skills courses.