diff --git a/api/server/router/checkpoint/checkpoint_experimental.go b/api/server/router/checkpoint/checkpoint_experimental.go index 8e495f1ea6..f0ac015ffa 100644 --- a/api/server/router/checkpoint/checkpoint_experimental.go +++ b/api/server/router/checkpoint/checkpoint_experimental.go @@ -10,6 +10,6 @@ func (r *checkpointRouter) initRoutes() { r.routes = []router.Route{ router.NewGetRoute("/containers/{name:.*}/checkpoints", r.getContainerCheckpoints), router.NewPostRoute("/containers/{name:.*}/checkpoints", r.postContainerCheckpoint), - router.NewDeleteRoute("/containers/{name:.*}/checkpoints/{checkpoint:.*}", r.deleteContainerCheckpoint), + router.NewDeleteRoute("/containers/{name}/checkpoints/{checkpoint}", r.deleteContainerCheckpoint), } } diff --git a/cmd/dockerd/daemon.go b/cmd/dockerd/daemon.go index 60357332f4..eecbd00480 100644 --- a/cmd/dockerd/daemon.go +++ b/cmd/dockerd/daemon.go @@ -398,18 +398,23 @@ func loadDaemonCliConfig(opts daemonOptions) (*daemon.Config, error) { func initRouter(s *apiserver.Server, d *daemon.Daemon, c *cluster.Cluster) { decoder := runconfig.ContainerDecoder{} - routers := []router.Router{ + routers := []router.Router{} + + // we need to add the checkpoint router before the container router or the DELETE gets masked + routers = addExperimentalRouters(routers, d, decoder) + + routers = append(routers, []router.Router{ container.NewRouter(d, decoder), image.NewRouter(d, decoder), systemrouter.NewRouter(d, c), volume.NewRouter(d), build.NewRouter(dockerfile.NewBuildManager(d)), swarmrouter.NewRouter(c), - } + }...) + if d.NetworkControllerEnabled() { routers = append(routers, network.NewRouter(d, c)) } - routers = addExperimentalRouters(routers, d, decoder) s.InitRouter(utils.IsDebugEnabled(), routers...) }