Fixed the issue with app builds onprem not working

This commit is contained in:
Frikky
2025-09-04 00:43:09 +02:00
parent 1b63e6cba6
commit 744d8d6b7f
7 changed files with 25 additions and 18 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ require (
github.com/gorilla/mux v1.8.1
github.com/h2non/filetype v1.1.3
github.com/satori/go.uuid v1.2.0
github.com/shuffle/shuffle-shared v0.9.16
github.com/shuffle/shuffle-shared v0.9.17
github.com/shuffle/singul v0.0.16
golang.org/x/crypto v0.40.0
google.golang.org/api v0.236.0
+9 -4
View File
@@ -3333,10 +3333,15 @@ func buildSwaggerApp(resp http.ResponseWriter, body []byte, user shuffle.User, s
// Read and copy the baseline Dockerfile
dockerfileContent, err := ioutil.ReadFile(dockerfileSource)
if err != nil {
log.Printf("[ERROR] Failed to read baseline Dockerfile: %s", err)
resp.WriteHeader(500)
resp.Write([]byte(`{"success": false, "reason": "Failed to read baseline Dockerfile"}`))
return
foundDockerfile := shuffle.GetBaseDockerfile()
if len(foundDockerfile) > 0 {
dockerfileContent = foundDockerfile
} else {
log.Printf("[ERROR] Failed to read baseline Dockerfile: %s", err)
resp.WriteHeader(500)
resp.Write([]byte(`{"success": false, "reason": "Failed to read baseline Dockerfile"}`))
return
}
}
err = ioutil.WriteFile(dockerfileDestination, dockerfileContent, 0644)