Open NorskNoobing opened 2 months ago
I get an error when building the docker image using the provided instructions
git clone https://github.com/jayden-chan/puggies.git cd puggies ./docker-build.sh
https://github.com/jayden-chan/puggies/blob/master/docs/Installation.md#building-docker-container-from-source
It seems like it could be as easy as to just install Go 1.20+ in the dockerfile.
I get an error when building the docker image using the provided instructions
https://github.com/jayden-chan/puggies/blob/master/docs/Installation.md#building-docker-container-from-source
It seems like it could be as easy as to just install Go 1.20+ in the dockerfile.
Full build log
```bash ${USER}@${HOSTNAME}:/home/${USER}/puggies# ./docker-build.sh ./docker-build.sh: 20: [[: not found Precise image version not specified. Tagging as latest [+] Building 13.1s (19/27) docker:default => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 2.56kB 0.0s => WARN: StageNameCasing: Stage name 'backendBuilder' should be lowercase (line 18) 0.1s => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 18) 0.1s => WARN: StageNameCasing: Stage name 'frontendBuilder' should be lowercase (line 33) 0.1s => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 33) 0.1s => [internal] load metadata for docker.io/library/node:lts-alpine 0.4s => [internal] load metadata for docker.io/library/golang:1.17.6-alpine 0.5s => [internal] load .dockerignore 0.1s => => transferring context: 107B 0.0s => [internal] load build context 0.1s => => transferring context: 8.23MB 0.1s => [backendbuilder 1/7] FROM docker.io/library/golang:1.17.6-alpine@sha256:519c827ec22e5cf7417c9ff063ec840a446cdd30681700a16cf42eb43823e27c 0.0s => [frontendbuilder 1/7] FROM docker.io/library/node:lts-alpine@sha256:2d07db07a2df6830718ae2a47db6fedce6745f5bcd174c398f2acdda90a11c03 0.0s => CACHED [backendbuilder 2/7] WORKDIR /workspace 0.0s => CACHED [backendbuilder 3/7] RUN apk update --no-cache && apk add --no-cache ca-certificates && apk --no-cache add tzdata 0.0s => CACHED [backendbuilder 4/7] COPY ./backend/go.mod ./backend/go.sum ./ 0.0s => CACHED [backendbuilder 5/7] RUN go mod download -x 0.0s => CACHED [backendbuilder 6/7] COPY ./backend/src . 0.0s => ERROR [backendbuilder 7/7] RUN go build -ldflags "-s -w" -o puggies . 12.0s => CACHED [frontendbuilder 2/7] WORKDIR /workspace 0.0s => CACHED [frontendbuilder 3/7] COPY ./frontend/package.json ./frontend/tsconfig.json ./frontend/yarn.lock ./ 0.0s => CACHED [frontendbuilder 4/7] RUN yarn install 0.0s => CACHED [frontendbuilder 5/7] COPY ./frontend/public ./public 0.0s => CACHED [frontendbuilder 6/7] COPY ./frontend/src ./src 0.0s => CANCELED [frontendbuilder 7/7] RUN yarn build 12.1s ------ > [backendbuilder 7/7] RUN go build -ldflags "-s -w" -o puggies .: 6.466 # golang.org/x/net/http2 6.466 /go/pkg/mod/golang.org/x/net@v0.21.0/http2/transport.go:1021:13: tc.NetConn undefined (type *tls.Conn has no field or method NetConn) 6.466 note: module requires Go 1.18 9.047 # github.com/gin-gonic/gin/binding 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/binding.go:32:22: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/binding.go:39:19: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/binding.go:46:31: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/binding.go:60:17: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/binding.go:64:11: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/binding.go:116:19: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/default_validator.go:49:47: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/default_validator.go:78:47: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/default_validator.go:87:37: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/form.go:22:48: undefined: any 9.047 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/binding/form.go:22:48: too many errors 9.047 note: module requires Go 1.20 9.058 # github.com/gin-gonic/gin/render 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/html.go:23:19: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/html.go:44:11: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/html.go:50:52: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/html.go:59:47: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/json.go:19:7: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/json.go:24:7: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/json.go:30:9: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/json.go:36:11: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/json.go:41:7: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/json.go:46:7: undefined: any 9.058 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/render/json.go:46:7: too many errors 9.058 note: module requires Go 1.20 ------ Dockerfile:31 -------------------- 29 | 30 | COPY ./backend/src . 31 | >>> RUN go build -ldflags "-s -w" -o puggies . 32 | 33 | FROM node:lts-alpine as frontendBuilder -------------------- ERROR: failed to solve: process "/bin/sh -c go build -ldflags \"-s -w\" -o puggies ." did not complete successfully: exit code: 2 ```