resource "docker_image" "octoprint" { provider = docker.printi name = "octoprint" build { context = "${path.module}/printers" target = "octoprint-mjpg-streamer" tag = ["ti-octoprint:latest"] } } resource "docker_volume" "ender5plus" { provider = docker.printi name = "ender5plus_config" } resource "docker_container" "ender5plus" { image = "${docker_image.octoprint.name}:latest" provider = docker.printi name = "ender5plus" env = [ "ENABLE_MJPG_STREAMER=false" ] restart = "always" ports { internal = 80 external = 3000 } devices { host_path = "/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A602AFFK-if00-port0" container_path = "/dev/ttyACM0" } volumes { container_path = "/octoprint" #host_path = docker_volume.ender5plus.name volume_name = docker_volume.ender5plus.name } }