I have created a generic Dockerfile and established a Docker client in my go code. I am able to build an image successfully in go using:
image, err := client.ImageBuild(
ctx,
buildContext,
types.ImageBuildOptions{
Dockerfile: Dockerfile,
Remove: true,
Tags: []string{
fmt.Sprintf("just/a:test"),
The image shows up in the docker image ls output. But it does not have the expected repository and tag values, which I think are taken from Tags above:
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> a34825be6ba1 16 minutes ago 72.8MB
What am I doing wrong? I just want to name and tag the image.