diff --git a/containers.v b/containers.v index 8b116bc..2d6d1a8 100644 --- a/containers.v +++ b/containers.v @@ -110,7 +110,7 @@ pub fn (mut d DockerConn) container_create(c NewContainer) ?CreatedContainer { // start_container starts the container with the given id. pub fn (mut d DockerConn) container_start(id string) ? { - d.send_request(Method.post, 'containers/$id/start')? + d.send_request(Method.post, '/containers/$id/start')? head, body := d.read_response()? if head.status_code != 204 { @@ -139,7 +139,7 @@ pub mut: } pub fn (mut d DockerConn) container_inspect(id string) ?ContainerInspect { - d.send_request(Method.get, 'containers/$id/json')? + d.send_request(Method.get, '/containers/$id/json')? head, body := d.read_response()? if head.status_code != 200 { @@ -161,7 +161,7 @@ pub fn (mut d DockerConn) container_inspect(id string) ?ContainerInspect { } pub fn (mut d DockerConn) container_remove(id string) ? { - d.send_request(Method.delete, 'containers/$id')? + d.send_request(Method.delete, '/containers/$id')? head, body := d.read_response()? if head.status_code != 204 { @@ -172,7 +172,7 @@ pub fn (mut d DockerConn) container_remove(id string) ? { } pub fn (mut d DockerConn) container_get_logs(id string) ?&StreamFormatReader { - d.send_request(Method.get, 'containers/$id/logs?stdout=true&stderr=true')? + d.send_request(Method.get, '/containers/$id/logs?stdout=true&stderr=true')? head := d.read_response_head()? if head.status_code != 200 { diff --git a/images.v b/images.v index 8506047..a7659dd 100644 --- a/images.v +++ b/images.v @@ -10,7 +10,7 @@ pub: // pull_image pulls the given image:tag. pub fn (mut d DockerConn) pull_image(image string, tag string) ? { - d.send_request(Method.post, 'images/create?fromImage=$image&tag=$tag')? + d.send_request(Method.post, '/images/create?fromImage=$image&tag=$tag')? head := d.read_response_head()? if head.status_code != 200 { @@ -33,7 +33,7 @@ pub fn (mut d DockerConn) pull_image(image string, tag string) ? { // create_image_from_container creates a new image from a container. pub fn (mut d DockerConn) create_image_from_container(id string, repo string, tag string) ?Image { - d.send_request(Method.post, 'commit?container=$id&repo=$repo&tag=$tag')? + d.send_request(Method.post, '/commit?container=$id&repo=$repo&tag=$tag')? head, body := d.read_response()? if head.status_code != 201 { @@ -49,7 +49,7 @@ pub fn (mut d DockerConn) create_image_from_container(id string, repo string, ta // remove_image removes the image with the given id. pub fn (mut d DockerConn) remove_image(id string) ? { - d.send_request(Method.delete, 'images/$id')? + d.send_request(Method.delete, '/images/$id')? head, body := d.read_response()? if head.status_code != 200 {