1

I'm building a project with a telegram bot.But there was some kind of error when creating the container.

#4 DONE 0.3s
 
#5 [stage-0 1/8] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1690243402@sha256:1a7dc562bf1f13299c20e55f8a72a287cb16dfea072fe4d20d084cfe23494afd
#5 DONE 0.0s
 
#6 [stage-1 1/5] FROM docker.io/library/ubuntu:jammy@sha256:0bced47fffa3361afa981854fcabcd4577cd43cebbb808cea2b1f33a3dd7f508
#6 DONE 0.0s
 
#7 [internal] load build context
 
#7 transferring context: 359.85kB done
#7 DONE 0.0s
 
#8 [stage-0 2/8] WORKDIR /app/
#8 CACHED
 
#9 [stage-0 3/8] COPY .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix
#9 CACHED
 
#10 [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d
#10 CACHED
 
#11 [stage-0 5/8] COPY . /app/.
 
#11 DONE 0.2s
 
#12 [stage-0 6/8] RUN --mount=type=cache,id=s/e3978b7a-2c8f-410f-8252-e31015239006-/root/cache/go-build,target=/root/.cache/go-build go mod download
 
#12 DONE 1.6s
 
 
#13 [stage-0 7/8] COPY . /app/.
#13 DONE 0.0s
 
#14 [stage-0 8/8] RUN --mount=type=cache,id=s/e3978b7a-2c8f-410f-8252-e31015239006-/root/cache/go-build,target=/root/.cache/go-build go build -o out
 
#14 0.370 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/e3978b7a-2c8f-410f-8252-e31015239006-/root/cache/go-build,target=/root/.cache/go-build go build -o out:
 
#14 0.370 no Go files in /app
-----
 
Dockerfile:23
-------------------
21 |     # build phase
22 |     COPY . /app/.
23 | >>> RUN --mount=type=cache,id=s/e3978b7a-2c8f-410f-8252-e31015239006-/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

My general main is in cmd/bot/main.go.

I thought the problem was that I didn't have environment variables, but most likely that's not the problem.

n3k
  • 11
  • 2

0 Answers0