R
Railwayβ€’2y ago
Tuan Nguyen

Build fail with Golang project

Did anyone use to build project with golang and see fail use case as content in the image, yet? Can you help me, pls? Detail error : rpc error: code = Unknown desc = Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "./out": stat ./out: no such file or directory: unknown
13 Replies
Percy
Percyβ€’2y ago
Project ID: 490c74bf-f51d-47f9-a208-bbfa85773bad
Percy
Percyβ€’2y ago
You might find these helpful: - Deploying a Golang application, with commands
⚠️ experimental feature
Percy
Percyβ€’2y ago
Hey <@710306258258886737>, Please link your discord account to railway.
nebula
nebulaβ€’2y ago
are you using a Dockerfile
Tuan Nguyen
Tuan NguyenOPβ€’2y ago
Railway
Railway
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
Tuan Nguyen
Tuan NguyenOPβ€’2y ago
Yes. I have a dockerfile .yaml Wow. Why do you know my project id poggers nice
nebula
nebulaβ€’2y ago
seems like you dont have a main.go file
nebula
nebulaβ€’2y ago
change this to go build cmd/cronjob/main.go -o out
nebula
nebulaβ€’2y ago
remove this (set it to be blank)
nebula
nebulaβ€’2y ago
actually, i'm not fully sure how your repo is structured you might be better off writing a Dockerfile
Tuan Nguyen
Tuan NguyenOPβ€’2y ago
please wait for me #15 1.987 named files must be .go files: -o #15 ERROR: executor failed running [/bin/bash -ol pipefail -c go build cmd/cronjob/main.go -o out]: exit code: 1 -----
[stage-0 8/8] RUN --mount=type=cache,id=s/a703108b-cfe8-403d-98d8-abe6b9a16906-/root/cache/go-build,target=/root/.cache/go-build go build cmd/cronjob/main.go -o out:
----- executor failed running [/bin/bash -ol pipefail -c go build cmd/cronjob/main.go -o out]: exit code: 1 Error: Docker build failed help me, pls
Tuan Nguyen
Tuan NguyenOPβ€’2y ago
Tuan Nguyen
Tuan NguyenOPβ€’2y ago
Help me, pls I asked chatgpt and fixed error πŸ˜„πŸ˜„πŸ˜„ go build - out cmd/cronjob/main.go Thanks for support me
Want results from more Discord servers?
Add your server