Closed
Description
Problem
The images folder is seemingly not pushed to the host when running coder templates create
on Windows clients. The second validation rule in the below template snippet seemingly always fails regardless of the availability of the relevant images folder:
variable "docker_image" {
description = "What Docker image would you like to use for your workspace?"
default = "alpine"
# List of images available for the user to choose from.
# Delete this condition to give users free text input.
validation {
condition = contains([
"alpine",
"ubuntu"
], var.docker_image)
error_message = "Invalid Docker image!"
}
# Prevents admin errors when the image is not found
validation {
condition = fileexists("images/${var.docker_image}.Dockerfile")
error_message = "Invalid Docker image. The file does not exist in the images directory."
}
}
This is also reproducible with the default docker-image-builds
template without any changes.
Coder version (on both host and client): Coder v0.7.6+a494489