1. 项目结构如下
2. 运行该Dockerfile
```
$ docker build -t mybuilder:v1 -f ./build/Dockerfile .
//-t:指定新建的Dockerfile名称
//-f:指定该dockerfile的位置
```
⚠️以下运行结果会出现的错误:
```
build -t mybuilder:v1 -f /build/Dockerfile .
```
failed to solve with frontend dockerfile.v0: failed to read dockerfile: error from sender: resolve : lstat /build: no such file or directory
```
$ docker build -t mybuilder:v1 ./build
```
=> ERROR [builder 3/8] ADD go.mod . 0.0s
=> ERROR [builder 4/8] ADD go.sum . 0.0s
failed to compute cache key: "/go.sum" not found: not found
```
$ docker build -t mybuilder:v1 .
```
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount425253894/Dockerfile: no such file or directory