forked from vieter-v/vieter
Fixed linting errors
This commit is contained in:
parent
732b53b6ce
commit
4a4362c138
3 changed files with 12 additions and 9 deletions
|
|
@ -20,8 +20,8 @@ pub struct NewContainer {
|
|||
entrypoint []string [json: Entrypoint]
|
||||
cmd []string [json: Cmd]
|
||||
env []string [json: Env]
|
||||
work_dir string [json: WorkingDir]
|
||||
user string [json: User]
|
||||
work_dir string [json: WorkingDir]
|
||||
user string [json: User]
|
||||
}
|
||||
|
||||
struct CreatedContainer {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ pub fn pull_image(image string, tag string) ?http.Response {
|
|||
return request('POST', urllib.parse('/v1.41/images/create?fromImage=$image&tag=$tag') ?)
|
||||
}
|
||||
|
||||
// create_image_from_container creates a new image from a container with the
|
||||
// given repo & tag, given the container's ID.
|
||||
pub fn create_image_from_container(id string, repo string, tag string) ?Image {
|
||||
res := request('POST', urllib.parse('/v1.41/commit?container=$id&repo=$repo&tag=$tag') ?) ?
|
||||
|
||||
|
|
@ -24,6 +26,7 @@ pub fn create_image_from_container(id string, repo string, tag string) ?Image {
|
|||
return json.decode(Image, res.text) or {}
|
||||
}
|
||||
|
||||
// remove_image removes the image with the given ID.
|
||||
pub fn remove_image(id string) ?bool {
|
||||
res := request('DELETE', urllib.parse('/v1.41/images/$id') ?) ?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue