build - Specify the configuration options that are applied at docker image build time.
Learn more.
NOTE! The network and label options mentioned in docker compose documentation do
not work with Kontena Stack Files.
There's no mention about network and labels in dockerfile documentation in build section.