R
Railway11mo ago
raii6926

Error: Docker build failed with go

I have the problem Error: Docker build failed for complete details in the image I attached can you help me solve the problem?
No description
23 Replies
Percy
Percy11mo ago
Project ID: c1c390ec-5526-44eb-8042-53ac752448f6
raii6926
raii692611mo ago
c1c390ec-5526-44eb-8042-53ac752448f6
Brody
Brody11mo ago
can you share screenshots of your folder structure?
raii6926
raii692611mo ago
hi i just solved the problem by myself that my main should not be in the folder. it works, but I want to ask if my game is in a folder, how does it work?
raii6926
raii692611mo ago
and i follow ur command at here https://www.answeroverflow.com/m/1164612660453724160 it still didn't work
Golang app: build failed - Railway
Hi, everyone Its my first time attemping to deploy to railwayapp and i dont understand why my golang project fails to build. Appreciate any help! 🙂 project: https://github.com/nikita-shtimenko/snippetbox-api ``` #5 DONE 0.0s #6 [stage-1 1/5] FROM docker.io/library/ubuntu:jammy@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e4...
Brody
Brody11mo ago
you'd need to change the build and start command, I think it would be something like this. build command
go build ./...
go build ./...
and the start command is dependent on the folder structure, I don't have a way to tell you this without knowing your project
raii6926
raii692611mo ago
to build command it should be here?
No description
Brody
Brody11mo ago
oof the UI is broken in more ways than I thought go here https://railway.app/account/feature-flags and enable staged changes, then go back to your service settings and you'll have a search bar, then change the build command
raii6926
raii692611mo ago
i see, okay thank you brody can i ask one more question?
Brody
Brody11mo ago
of course we aren't done until this is solved
raii6926
raii692611mo ago
Previously I had deployed on the railways and it looked like there was no Docker, but for the new version now there is Docker, is there really an update?
No description
raii6926
raii692611mo ago
No description
Brody
Brody11mo ago
even the old mysql databases used docker, everything uses docker.
raii6926
raii692611mo ago
My main question is already working, thank you. I think I will deploy on the railway again and if there are any questions I apologize for asking again here. Thank You okey i get it
Brody
Brody11mo ago
don't apologise! we are happy to help
Arsen1c
Arsen1c10mo ago
i am on a similar boat. my project structure is like this
project-root/
|-- internal/
| |-- api/
| | |-- handlers.go
| |
| |-- utils/
| |-- http_utils.go
|
|-- go.mod
|-- go.sum
|-- main.go
project-root/
|-- internal/
| |-- api/
| | |-- handlers.go
| |
| |-- utils/
| |-- http_utils.go
|
|-- go.mod
|-- go.sum
|-- main.go
No description
Arsen1c
Arsen1c10mo ago
the service ID is: 7a1fbe84-88ed-4f02-8fdf-710b05e0cba0
Arsen1c
Arsen1c10mo ago
there you go
Brody
Brody10mo ago
looks like your go.mod file is missing some packages
Arsen1c
Arsen1c10mo ago
awwhh hell yeahh! ran go mod tidy and added the dependencies, this worked thanks brody!
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server