mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix the clashing route syntax for checkpoint/container delete.
Signed-off-by: boucher <rboucher@gmail.com>
This commit is contained in:
parent
cb0ad4258b
commit
0dfbf960d7
2 changed files with 9 additions and 4 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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...)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue