for future searchers on this issue: The answer is to add the network to the build step as well eg:
build:
context: ./
dockerfile: Dockerfile
network: host
Share and learn in the Docker community.
for future searchers on this issue: The answer is to add the network to the build step as well eg:
build:
context: ./
dockerfile: Dockerfile
network: host