From 5bc54c37f3e4dbaa25408747d950f4060eee996e Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Thu, 5 Jan 2023 13:25:58 +0100 Subject: [PATCH] feat: implement image_tag --- ROADMAP.md | 2 +- images.v | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 52e22a2..648d4c5 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -42,7 +42,7 @@ reference](https://docs.docker.com/engine/api/v1.41/). - [ ] Inspect an image - [ ] Get the history of an image - [ ] Push an image - - [ ] Tag an image + - [x] Tag an image - [ ] Remove an image - [ ] Search images - [ ] Delete unused images diff --git a/images.v b/images.v index ec328bd..1da31c7 100644 --- a/images.v +++ b/images.v @@ -49,3 +49,9 @@ pub fn (mut d DockerConn) image_remove(id string) ! { d.send()! d.read_response()! } + +pub fn (mut d DockerConn) image_tag(name string, repo string, tag string) ! { + d.request(.post, '/images/$name/tag', {'repo': repo, 'tag': tag}) + d.send()! + d.read_response()! +}