containerd: add state flag to specify state dir
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
d541567119
commit
dbd3eff1e6
@ -66,6 +66,7 @@ func TestMain(m *testing.M) {
|
||||
|
||||
err := ctrd.start("containerd", address, []string{
|
||||
"--root", defaultRoot,
|
||||
"--state", defaultState,
|
||||
"--log-level", "debug",
|
||||
}, buf, buf)
|
||||
if err != nil {
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
|
||||
const (
|
||||
defaultRoot = "/var/lib/containerd-test"
|
||||
defaultState = "/run/containerd-test"
|
||||
defaultAddress = "/run/containerd-test/containerd.sock"
|
||||
)
|
||||
|
||||
|
@ -18,6 +18,7 @@ var (
|
||||
dockerLayerFolders []string
|
||||
|
||||
defaultRoot = filepath.Join(os.Getenv("programfiles"), "containerd", "root-test")
|
||||
defaultState = filepath.Join(os.Getenv("programfiles"), "containerd", "state-test")
|
||||
)
|
||||
|
||||
func platformTestSetup(client *Client) error {
|
||||
|
@ -66,6 +66,10 @@ func main() {
|
||||
Name: "root",
|
||||
Usage: "containerd root directory",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "state",
|
||||
Usage: "containerd state directory",
|
||||
},
|
||||
}
|
||||
app.Commands = []cli.Command{
|
||||
configCommand,
|
||||
@ -156,6 +160,10 @@ func applyFlags(context *cli.Context, config *server.Config) error {
|
||||
name: "root",
|
||||
d: &config.Root,
|
||||
},
|
||||
{
|
||||
name: "state",
|
||||
d: &config.State,
|
||||
},
|
||||
{
|
||||
name: "address",
|
||||
d: &config.GRPC.Address,
|
||||
|
Loading…
Reference in New Issue
Block a user