Support to create container without docker_image resource #185
suzuki-shunsuke
started this conversation in
Ideas
Replies: 3 comments 5 replies
-
|
Maybe adding an attribute |
Beta Was this translation helpful? Give feedback.
4 replies
-
|
The problem is there are many formats which represent an image. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I try using Discussion.
Currently, when we create a docker_container resource, an image ID is required so docker_image resource is used to convert an image name into an image ID.
e.g.
https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/container#image
But in this case the motivation to use docker_image resource isn't to manage the image with Terraform but just to create a container.
Using docker_image resource means the image is managed with Terraform.
So I feel this gap raises undesirable situation.
Even if the container is updated, we don't want to delete an old image.
Of course I know the docker_image's
keep_locallyattribute exists to prevent the old image from being removed,but I wonder this behaviour isn't natural for Terraform and maybe this is the root cause of some problems.
For example, recently I encounter some problems regarding to docker_image resource.
#178 (comment)
#178 (comment)
If we want to manage the image with Terraform,
docker_imageresource is good,but otherwise I wonder we should create a container without
docker_imageresource.That is, we should be able to create a container by specifying image name, image digest etc.
I'm not confident that my idea is correct.
Beta Was this translation helpful? Give feedback.
All reactions