containerd / containerd/nerdctl
Allow external containerd-logging-plugin for nerdctl
- Dominant language
- Go
- Stars
- 10.4k
- Forks
- 826
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 44
Description
### What is the problem you're trying to solve
Memory footprint per container, e.g. https://github.com/containerd/nerdctl/issues/2441 https://github.com/containerd/nerdctl/issues/1419
### Describe the solution you'd like
Add an optional containerd-logging-plugin detection and loading, e.g.
```diff
diff --git a/pkg/cmd/container/create.go b/pkg/cmd/container/create.go
index c39d036c..47a406fc 100644
--- a/pkg/cmd/container/create.go
+++ b/pkg/cmd/container/create.go
@@ -408,6 +408,10 @@ func GenerateLogURI(dataStore string) (*url.URL, error) {
if err != nil {
return nil, err
}
+ shimExe := selfExe + "-internal-logging"
+ if fi, err := os.Stat(shimExe); err == nil && (fi.Mode().Perm()&0111) != 0 {
+ selfExe = shimExe
+ }
args := map[string]string{
logging.MagicArgv1: dataStore,
}
```
above naive patch will enable us to putting `/usr/local/bin/nerdctl-internal-logging` instead of `nerdctl`

### Additional context
I already have a PoC in https://github.com/phuslu/nerdctl/tree/main/cmd/nerdctl-internal-logging but need more tweaks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.