nerdctl compose up requires CNI plugins to be installed (for network_mode: host
)
#3714
josv-openai
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good morning. I want to use
nerdctl compose up
withnetwork_mode: host
on a node that does not have the CNI plugins (like bridge and portmap) installed. Here is an example compose file:When I run
nerdctl compose up
I get the following error:The CNI plugins are not installed (and we don't want to install them). This error tracks back to https://github.com/containerd/nerdctl/blob/main/pkg/cmd/compose/compose.go#L68:
The inclusion of
netutil.WithDefaultNetwork(globalOptions.BridgeIP)
here checks if there is either a default network configured (through name or label), and if there is not, it creates a bridge network. Note that all of this is done before reading the compose file, so before realizing thatnetwork_mode
might be set tonone
orhost
.If I build my own
nerdctl
without the offending stanza, it all works swimmingly, but if you then want tocompose up
a container that requires a network configuration, you get a slightly more confusing error later in the process.Any thoughts about this? I might be able to hack around this, but it might be worthwhile to change the flow somewhat and allow for this use case.
Beta Was this translation helpful? Give feedback.
All reactions