gf icon indicating copy to clipboard operation
gf copied to clipboard

gf docker not working correctly

Open kingyond opened this issue 2 years ago • 3 comments

create docker image missing name/tag, cannot push to aliyuncs.

1. What version of Go and system type/arch are you using?

go version go1.16.7 windows/amd64

2. What version of GoFrame are you using?

GF Version: v2.1.2

3. Can this issue be re-produced with the latest release?

yes.

4. What did you do?

use command to build docker and push to server: gf docker main.go -p -t registry.cn-shenzhen.aliyuncs.com/babyforward/kaoqin

5. What did you expect to see?

build docker image with correct naem. push the docker image to server.

6. What did you see instead?

Success build image. But the image missing name/tag.(which is missing in Docker Desktop, After restart Docker Desktop, you can only see no name/tag image). Fail to push to server.(no message about push).

Docker Desktop version 4.11.0

$ gf docker main.go -p -t registry.cn-shenzhen.aliyuncs.com/babyforward/kaoqin:1.0 2022-08-04 16:32:21.223 start building... 2022-08-04 16:32:21.224 go build -o ./temp/linux_amd64/main main.go 2022-08-04 16:32:23.115 done! [+] Building 4.6s (10/10) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/loads/alpine:3.8 3.5s => [1/5] FROM docker.io/loads/alpine:3.8@sha256:8c3c3aae45cd9b546be655fe311217626112ca566efc8bb255aeb85b78cda007 0.0s => [internal] load build context 0.2s => => transferring context: 30.42MB 0.2s => CACHED [2/5] ADD resource /app/ 0.0s => [3/5] ADD ./temp/linux_amd64/main /app/main 0.1s => [4/5] RUN chmod +x /app/main 0.5s => [5/5] WORKDIR /app 0.0s => exporting to image 0.2s => => exporting layers 0.2s => => writing image sha256:9e4b4da3cb46de7da130bfd3ed9e323e5a4e2857f1238680615ca466e2fec72b

kingyond avatar Aug 04 '22 08:08 kingyond

I meet the same problem.

xrlin avatar Sep 02 '22 08:09 xrlin

me too

FallingHeart avatar Sep 03 '22 14:09 FallingHeart

create docker image missing name/tag, cannot push to aliyuncs.

1. What version of Go and system type/arch are you using?

go version go1.16.7 windows/amd64

2. What version of GoFrame are you using?

GF Version: v2.1.2

3. Can this issue be re-produced with the latest release?

yes.

4. What did you do?

use command to build docker and push to server: gf docker main.go -p -t registry.cn-shenzhen.aliyuncs.com/babyforward/kaoqin

5. What did you expect to see?

build docker image with correct naem. push the docker image to server.

6. What did you see instead?

Success build image. But the image missing name/tag.(which is missing in Docker Desktop, After restart Docker Desktop, you can only see no name/tag image). Fail to push to server.(no message about push).

Docker Desktop version 4.11.0

$ gf docker main.go -p -t registry.cn-shenzhen.aliyuncs.com/babyforward/kaoqin:1.0 2022-08-04 16:32:21.223 start building... 2022-08-04 16:32:21.224 go build -o ./temp/linux_amd64/main main.go 2022-08-04 16:32:23.115 done! [+] Building 4.6s (10/10) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/loads/alpine:3.8 3.5s => [1/5] FROM docker.io/loads/alpine:3.8@sha256:8c3c3aae45cd9b546be655fe311217626112ca566efc8bb255aeb85b78cda007 0.0s => [internal] load build context 0.2s => => transferring context: 30.42MB 0.2s => CACHED [2/5] ADD resource /app/ 0.0s => [3/5] ADD ./temp/linux_amd64/main /app/main 0.1s => [4/5] RUN chmod +x /app/main 0.5s => [5/5] WORKDIR /app 0.0s => exporting to image 0.2s => => exporting layers 0.2s => => writing image sha256:9e4b4da3cb46de7da130bfd3ed9e323e5a4e2857f1238680615ca466e2fec72b

see #2100 well, try this: $ gf docker main.go -p -tp registry.cn-shenzhen.aliyuncs.com/babyforward -tn kaoqin:1.0

FallingHeart avatar Sep 03 '22 15:09 FallingHeart