Nikita Shtimenko
Nikita Shtimenko
Explore posts from servers
RRailway
Created by Nikita Shtimenko on 10/19/2023 in #βœ‹ο½œhelp
Golang app: build failed
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:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f

#6 DONE 0.0s



#7 [internal] load build context

#7 transferring context: 24.52kB done

#7 DONE 0.0s



#8 [stage-0 2/10] WORKDIR /app/

#8 CACHED



#9 [stage-0 3/8] COPY .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix

#9 CACHED



#10 [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix && nix-collect-garbage -d

#10 CACHED



#11 [stage-0 5/8] COPY . /app/.

#11 DONE 0.0s



#12 [stage-0 6/8] RUN --mount=type=cache,id=s/9d103b90-f62d-425c-b77c-91c33b0e602f-/root/cache/go-build,target=/root/.cache/go-build go mod download



#12 DONE 0.5s





#13 [stage-0 7/8] COPY . /app/.

#13 DONE 0.0s



#14 [stage-0 8/8] RUN --mount=type=cache,id=s/9d103b90-f62d-425c-b77c-91c33b0e602f-/root/cache/go-build,target=/root/.cache/go-build go build -o out



#14 0.341 no Go files in /app

#14 ERROR: process "/bin/bash -ol pipefail -c go build -o out" did not complete successfully: exit code: 1

-----

> [stage-0 8/8] RUN --mount=type=cache,id=s/9d103b90-f62d-425c-b77c-91c33b0e602f-/root/cache/go-build,target=/root/.cache/go-build go build -o out:

0.341 no Go files in /app

-----



Dockerfile:23

-------------------

21 | # build phase

22 | COPY . /app/.

23 | >>> RUN --mount=type=cache,id=s/9d103b90-f62d-425c-b77c-91c33b0e602f-/root/cache/go-build,target=/root/.cache/go-build go build -o out

24 |

25 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c go build -o out" did not complete successfully: exit code: 1



Error: Docker build failed
#5 DONE 0.0s



#6 [stage-1 1/5] FROM docker.io/library/ubuntu:jammy@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f

#6 DONE 0.0s



#7 [internal] load build context

#7 transferring context: 24.52kB done

#7 DONE 0.0s



#8 [stage-0 2/10] WORKDIR /app/

#8 CACHED



#9 [stage-0 3/8] COPY .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix

#9 CACHED



#10 [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix && nix-collect-garbage -d

#10 CACHED



#11 [stage-0 5/8] COPY . /app/.

#11 DONE 0.0s



#12 [stage-0 6/8] RUN --mount=type=cache,id=s/9d103b90-f62d-425c-b77c-91c33b0e602f-/root/cache/go-build,target=/root/.cache/go-build go mod download



#12 DONE 0.5s





#13 [stage-0 7/8] COPY . /app/.

#13 DONE 0.0s



#14 [stage-0 8/8] RUN --mount=type=cache,id=s/9d103b90-f62d-425c-b77c-91c33b0e602f-/root/cache/go-build,target=/root/.cache/go-build go build -o out



#14 0.341 no Go files in /app

#14 ERROR: process "/bin/bash -ol pipefail -c go build -o out" did not complete successfully: exit code: 1

-----

> [stage-0 8/8] RUN --mount=type=cache,id=s/9d103b90-f62d-425c-b77c-91c33b0e602f-/root/cache/go-build,target=/root/.cache/go-build go build -o out:

0.341 no Go files in /app

-----



Dockerfile:23

-------------------

21 | # build phase

22 | COPY . /app/.

23 | >>> RUN --mount=type=cache,id=s/9d103b90-f62d-425c-b77c-91c33b0e602f-/root/cache/go-build,target=/root/.cache/go-build go build -o out

24 |

25 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c go build -o out" did not complete successfully: exit code: 1



Error: Docker build failed
21 replies