From 0ef85ad13f435bd8a34c947abda39bb00ae69c7d Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Thu, 7 Jan 2021 03:54:31 +0900 Subject: [PATCH] fix: set "latest" to tag when tag isn't specified (#117) --- docker/resource_docker_image_funcs.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/resource_docker_image_funcs.go b/docker/resource_docker_image_funcs.go index cd0093ebd..0e55b5539 100644 --- a/docker/resource_docker_image_funcs.go +++ b/docker/resource_docker_image_funcs.go @@ -264,6 +264,10 @@ func parseImageOptions(image string) internalPullImageOptions { pullOpts.Tag = image[prefixLength+tagIndex+1:] } + if pullOpts.Tag == "" { + pullOpts.Tag = "latest" + } + return pullOpts }