mq-container
mq-container copied to clipboard
make build-advancedserver fails due to docker build is not supporting --network anymore
Hi As you can see in this note https://github.com/docker/buildx/issues/591 --network is not more supported in docker build
to reproduce run:
make build-advancedserver
you should get Error response from daemon: network mode "build" not supported by buildkit
changing the Makefile by removing --network build in the line:
$(eval EXTRA_ARGS=$(if $(findstring docker,$(COMMAND)), --build-arg MQ_URL=http://build:8080/$4, --volume $(DOWNLOADS_DIR):/var/downloads --build-arg MQ_URL=file:///var/downloads/$4))
of the function build-ibmmq works better.
If you use the Makefile, it shouldn't be using Docker BuildKit, as we specifically disable it — if it's still enabled for you, it would be interesting to know what your build environment I (e.g. Docker version and OS), so we can understand why it's not disabled.
I'm not sure I understand your suggestion. I think the reasons we originally used the custom network were:
- Prevent opening ports on the host machine's network. By using a custom network, the ports are only accessible on the local machine
- To get the DNS alias, which is inserted by Docker.
It may be that things have moved on in Docker to allow these by other ways, which we should look into.
I build on my MacOS X86 machine, Docker Desktop 3.4, and I have to run with
DOCKER_BUILDKIT=0 make build-devserver
If I don't specify DOCKER_BUILDKIT=0
I get the error:
Error response from daemon: network mode "build" not supported by buildkit
What version of make
are you using? I wonder if there's a bug in make which is causing the environment variable to not get passed through.
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
I am on mac / amd64. Using the flag export DOCKER_BUILDKIT=0, make the build working now. Thank you