Signed-off-by: boucher <rboucher@gmail.com>
| ... | ... |
@@ -10,6 +10,6 @@ func (r *checkpointRouter) initRoutes() {
|
| 10 | 10 |
r.routes = []router.Route{
|
| 11 | 11 |
router.NewGetRoute("/containers/{name:.*}/checkpoints", r.getContainerCheckpoints),
|
| 12 | 12 |
router.NewPostRoute("/containers/{name:.*}/checkpoints", r.postContainerCheckpoint),
|
| 13 |
- router.NewDeleteRoute("/containers/{name:.*}/checkpoints/{checkpoint:.*}", r.deleteContainerCheckpoint),
|
|
| 13 |
+ router.NewDeleteRoute("/containers/{name}/checkpoints/{checkpoint}", r.deleteContainerCheckpoint),
|
|
| 14 | 14 |
} |
| 15 | 15 |
} |
| ... | ... |
@@ -398,18 +398,23 @@ func loadDaemonCliConfig(opts daemonOptions) (*daemon.Config, error) {
|
| 398 | 398 |
func initRouter(s *apiserver.Server, d *daemon.Daemon, c *cluster.Cluster) {
|
| 399 | 399 |
decoder := runconfig.ContainerDecoder{}
|
| 400 | 400 |
|
| 401 |
- routers := []router.Router{
|
|
| 401 |
+ routers := []router.Router{}
|
|
| 402 |
+ |
|
| 403 |
+ // we need to add the checkpoint router before the container router or the DELETE gets masked |
|
| 404 |
+ routers = addExperimentalRouters(routers, d, decoder) |
|
| 405 |
+ |
|
| 406 |
+ routers = append(routers, []router.Router{
|
|
| 402 | 407 |
container.NewRouter(d, decoder), |
| 403 | 408 |
image.NewRouter(d, decoder), |
| 404 | 409 |
systemrouter.NewRouter(d, c), |
| 405 | 410 |
volume.NewRouter(d), |
| 406 | 411 |
build.NewRouter(dockerfile.NewBuildManager(d)), |
| 407 | 412 |
swarmrouter.NewRouter(c), |
| 408 |
- } |
|
| 413 |
+ }...) |
|
| 414 |
+ |
|
| 409 | 415 |
if d.NetworkControllerEnabled() {
|
| 410 | 416 |
routers = append(routers, network.NewRouter(d, c)) |
| 411 | 417 |
} |
| 412 |
- routers = addExperimentalRouters(routers, d, decoder) |
|
| 413 | 418 |
|
| 414 | 419 |
s.InitRouter(utils.IsDebugEnabled(), routers...) |
| 415 | 420 |
} |