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
Project ID:
490c74bf-f51d-47f9-a208-bbfa85773bad
You might find these helpful:
- Deploying a Golang application, with commands
β οΈ experimental feature
are you using a Dockerfile
Railway
Railway
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
Yes. I have a dockerfile .yaml
Wow. Why do you know my project id nice
seems like you dont have a main.go file
change this to
go build cmd/cronjob/main.go -o out
remove this (set it to be blank)
actually, i'm not fully sure how your repo is structured
you might be better off writing a
Dockerfile
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
Help me, pls
I asked chatgpt and fixed error πππ
go build - out cmd/cronjob/main.go
Thanks for support me