terraform-provider-docker icon indicating copy to clipboard operation
terraform-provider-docker copied to clipboard

Creation of docker container failed (python image)

Open ishankapoor21 opened this issue 7 months ago • 1 comments

code: - terraform { required_providers { docker = { source = "kreuzwerker/docker" version = "3.0.2" } } }

provider "docker" { host = "unix:///var/run/docker.sock" } resource "docker_image" "ubuntu" { name = "python:latest" } resource "docker_container" "container" { image = docker_image.ubuntu.image_id name = "ubuntu1e" wait = true } resource "docker_network" "private_network" { name = "inet2" driver = "bridge" }

error: - docker_container.container: Creating... ╷ │ Error: Plugin did not respond │ │ with docker_container.container, │ on Docker_Create_Container_Main.tf line 1, in resource "docker_container" "container": │ 1: resource "docker_container" "container" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵

Stack trace from the terraform-provider-docker_v3.0.2 plugin:

panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc5b6f7]

goroutine 16 [running]: github.com/terraform-providers/terraform-provider-docker/internal/provider.resourceDockerContainerCreate.func1(0x7?) github.com/terraform-providers/terraform-provider-docker/internal/provider/resource_docker_container_funcs.go:508 +0x1b7 created by github.com/terraform-providers/terraform-provider-docker/internal/provider.resourceDockerContainerCreate github.com/terraform-providers/terraform-provider-docker/internal/provider/resource_docker_container_funcs.go:521 +0x2b6e

Error: The terraform-provider-docker_v3.0.2 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely helpful if you could report the crash with the plugin's maintainers so that it can be fixed. The output above should help diagnose the issue.

ishankapoor21 avatar Jan 05 '24 09:01 ishankapoor21