It looks like it's not possible to edit the main.go file location so I am going to try change the docker file
RUN CGO_ENABLED=0 GOOS=linux go build -o main ./cmd/myapp/
I still get the same error
=> [builder 5/6] COPY . .
2.3s => ERROR [builder 6/6] RUN CGO_ENABLED=0 GOOS=linux go build -o main ./cmd/myapp/
13.7s
[builder 6/6] RUN CGO_ENABLED=0 GOOS=linux go build -o main ./cmd/myapp/: #13 13.28 stat /app/cmd/myapp: directory not found