- Notifications
You must be signed in to change notification settings - Fork925
Open
Description
Discussed in#13728
Originally posted bygiovannibaratta July 1, 2024
Hello,
I have deployed Coder using a Docker container. I am experimenting with the APIs and I found this issue that I am not able to solve.
I can successfully do the following actions with the APIs
- Upload a Tar archive of the source code for the template (it includes a main.tf that I copied from the already existing templates and a Dockerfile)
- Create a Template version
- Create a Template
For some reason even if the template version is created, the build fails with the following error, and I cannot set it as active for the template.
{"id":"db5cd864-2d3f-44cb-8965-e197b9d5f3d6","template_id":"87f407da-978d-41d6-807f-12219d32a672",..."job": {"id":"a8b3f36b-06b7-4314-ac74-ba98b23d8aac","created_at":"2024-07-01T10:36:03.740869Z","started_at":"2024-07-01T10:36:03.743923Z","completed_at":"2024-07-01T10:36:03.754325Z","error":"run parse: recv parse source: extract archive: create file\"/home/coder/.cache/coder/provisioner-0/work/Session9e55df3e-9d8c-4a63-8806-d38ba1f6bb89/build/Dockerfile\" (mode -rw-r--r--): open /home/coder/.cache/coder/provisioner-0/work/Session9e55df3e-9d8c-4a63-8806-d38ba1f6bb89/build/Dockerfile: no such file or directory","status":"failed","worker_id":"2149069d-4e69-49aa-8c8e-204bb40c68aa","file_id":"ece6e957-3220-4b26-b095-3a68fb5f7ab6","tags": {"owner":"","scope":"organization" },"queue_position":0,"queue_size":0 },...}
The strange thing is that if I try to open the template version from the web console, I can see all the files in the right location and if I click Build it succeed without any error. I tried to change the permissions of the archive, of the Dockerbuild file, I tried to use a zip instead of a tar without luck. It is not clear to me what the problem is.