-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial-network should not be added to docker build #7520
Comments
Probably what we need to do is pass the |
Related issue: docker/buildx#175 |
Correct way to use a network during builds is to use a custom builder it seems. Thats a bit frustrating... |
So would need to create a builder per app, with its initial networks (global and specific)? Something like |
The network flag is unsupported by the docker image build command under buildx (which is default now). Closes #7520
Closing as there is a pull request open. |
Thanks! |
Description of problem
I added an initial network ("global-net") for a new app and tried to deploy it using
git:from-image
and it failed:The problem occurs because Dokku calls docker to build the image with the following command:
... but
--network
indocker image build
does not refer to a Docker network, it expects the networking mode for the RUN instructions during build.The Docker semantics is not consistent in this case (and it sucks), since in
docker run
, the--network
connects a container to a network (it should be called--networking-mode
indocker build image
).I looked for an way to actually attach the network during the build phase and looks like it's not possible, so Dokku should remove the
--network=<initial-network>
. After some research I think the problem is in this line.Steps to reproduce
The same problem will happen if I have a global initial-network set (instead of setting it for the app specifically).
The problem won't happen if I set the initial-network after deploying the image (but only if no global initial-network is set):
dokku report $APP_NAME
N/A
Additional information
No response
Output of failing commands after running: dokku trace:off
Output of failing commands after running: dokku trace:on
The text was updated successfully, but these errors were encountered: