Implement volume copy up.
This pulls in and uses github.com/docker/docker/pkg/chrootarchive for the actual copy up which is some battle hardened code to unpack avoiding things like symlink traversal security issues. However it does pull in a pretty huge pile of vendoring, including github.com/docker/docker/pkg/reexec which we must then call at startup. It's not immediately clear that this tradeoff is the correct one. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
@@ -19,6 +19,7 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/docker/docker/pkg/reexec"
|
||||
"github.com/golang/glog"
|
||||
"github.com/opencontainers/selinux/go-selinux"
|
||||
"github.com/spf13/pflag"
|
||||
@@ -30,6 +31,9 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
if reexec.Init() {
|
||||
return
|
||||
}
|
||||
o := options.NewCRIContainerdOptions()
|
||||
o.AddFlags(pflag.CommandLine)
|
||||
if err := o.InitFlags(pflag.CommandLine); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user