From 09de77b5431a2bc0c9c2c2e2a3d8eee1da66a657 Mon Sep 17 00:00:00 2001 From: trevanlye Date: Mon, 11 Nov 2024 11:05:23 +0800 Subject: [PATCH] Update README.md we need 'go mod init first' before 'go get' --- image/multistage-builds/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/image/multistage-builds/README.md b/image/multistage-builds/README.md index 9d55980a9..05126001a 100644 --- a/image/multistage-builds/README.md +++ b/image/multistage-builds/README.md @@ -35,7 +35,8 @@ WORKDIR /go/src/github.com/go/helloworld/ COPY app.go . -RUN go get -d -v github.com/go-sql-driver/mysql \ +RUN go mod init helloworld \ + && go get -d -v github.com/go-sql-driver/mysql \ && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . \ && cp /go/src/github.com/go/helloworld/app /root