koddr/tutorial-go-fiber-rest-api

Dockerfile: COPY go.mod go.sum ./ error

rmdhfz opened this issue · 3 comments

Required check list:

  • I'm gonna mark the checkboxes like this.
  • I didn't find in the repository's issues section similar bug.
  • I understand, this is Open Source and not-for-profit product.
  • This is not about third-party project, framework, package or technology.

My environment:

  • OS (uname -a): Windows 10
  • Golang (go version): go1.16.7 windows/amd64

Describe the bug:
=> ERROR [builder 3/6] COPY go.mod go.sum ./ 0.0s

[builder 3/6] COPY go.mod go.sum ./:


failed to compute cache key: "/go.sum" not found: not found

Steps to reproduce the behavior:

  1. Create Dockerfile
  2. Go to docker build -t fiber .
  3. See error

Screenshots:
image

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template!

koddr commented

@rmdhfz hi!

Did you download all files from this repository by git clone before run docker build -t fiber .?

By the way, you do not need to run all commands manually, because repository has Makefile with all shortcuts. Try make docker.run for configuring all Docker containers and environment.

Okay, thank you @koddr