Add shim log pipe for log forwarding to the daemon
A fifo on unix or named pipe on Windows will be provided to the shim. It can be located inside the `cwd` of the shim named "log". The shims can use the existing `github.com/containerd/containerd/log` package to log debug messages. Messages will automatically be output in the containerd's daemon logs with the correct fiels and runtime set. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -19,16 +19,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/containerd/containerd/runtime/v2/runc"
|
||||
"github.com/containerd/containerd/runtime/v2/shim"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := shim.Run(runc.New); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "containerd-shim-runc-v1: %s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
shim.Run("io.containerd.runc.v1", runc.New)
|
||||
}
|
||||
|
Reference in New Issue
Block a user