refactor: rename some image functions
parent
2db4afc226
commit
6b578a80cd
8
images.v
8
images.v
|
@ -12,8 +12,8 @@ pub fn (mut d DockerConn) image_inspect(image string) !Image {
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
// pull_image pulls the given image:tag.
|
// image_pull pulls the given image:tag.
|
||||||
pub fn (mut d DockerConn) pull_image(image string, tag string) ! {
|
pub fn (mut d DockerConn) image_pull(image string, tag string) ! {
|
||||||
d.request(.post, '/images/create', {
|
d.request(.post, '/images/create', {
|
||||||
'fromImage': image
|
'fromImage': image
|
||||||
'tag': tag
|
'tag': tag
|
||||||
|
@ -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.
|
// 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 {
|
pub fn (mut d DockerConn) image_from_container(id string, repo string, tag string) !Image {
|
||||||
d.request(.post, '/commit', {
|
d.request(.post, '/commit', {
|
||||||
'container': id
|
'container': id
|
||||||
'repo': repo
|
'repo': repo
|
||||||
|
@ -45,7 +45,7 @@ pub fn (mut d DockerConn) create_image_from_container(id string, repo string, ta
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove_image removes the image with the given id.
|
// remove_image removes the image with the given id.
|
||||||
pub fn (mut d DockerConn) remove_image(id string) ! {
|
pub fn (mut d DockerConn) image_remove(id string) ! {
|
||||||
d.request(.delete, '/images/$id', {})
|
d.request(.delete, '/images/$id', {})
|
||||||
d.send()!
|
d.send()!
|
||||||
d.read_response()!
|
d.read_response()!
|
||||||
|
|
Loading…
Reference in New Issue