nerdctl compose up requires CNI plugins to be installed (for network_mode: host)
              
              #3714
            
            
                  
                    
                      josv-openai
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment
-
| Running everything with  I've created an issue: #4461 | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Good morning. I want to use
nerdctl compose upwithnetwork_mode: hoston 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 upI 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_modemight be set tononeorhost.If I build my own
nerdctlwithout the offending stanza, it all works swimmingly, but if you then want tocompose upa 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