Closed thomaspeugeot closed 2 years ago
Problem:
thomaspeugeot@MacBook-Pro-de-Thomas gongtenk % docker build --tag docker-gongtenk .
[+] Building 6.1s (9/13)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 826B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/golang:1.16-alpine 1.6s
=> [auth] library/golang:pull token for registry-1.docker.io 0.0s
=> CACHED [1/9] FROM docker.io/library/golang:1.16-alpine@sha256:423de38f9cb9227dd0c89bc54896369333e13c38ceb1 0.0s
=> [internal] load build context 1.9s
=> => transferring context: 109.61MB 1.8s
=> [2/9] COPY go.mod . 0.2s
=> [3/9] COPY go.sum . 0.0s
=> ERROR [4/9] RUN go mod download 2.4s
------
> [4/9] RUN go mod download:
#9 2.375 go: github.com/fullstack-lang/gongxlsx@v0.0.0-20211110082428-9aa1df985333: git init --bare in /go/pkg/mod/cache/vcs/189666a4593c9af12f434b618e8821fb2ca26ce295b16f8d29cb34c5d667e555: exec: "git": executable file not found in $PATH
------
executor failed running [/bin/sh -c go mod download]: exit code: 1
This is because the go:1.16-alpline is very slim. Let's go
fatal: could not read Username for 'https://github.com': terminal prompts disabled
gongxlsx was private !
=> [ 5/10] RUN go mod download 685.0s
Apparently, go in docker mangles he path. Let's go back to the tutorial exemple and see if it is the same issue.
Steps :
docker build --tag docker-gongtenk