所以!我正在设置一个CI / CD系统,它具有自己的文件夹和yaml文件。在该文件夹中,我需要调用docker build。但是,我继续得到 以下错误:
unable to prepare context: path "./server" not found
。
以下是我的应用程序的结构:
├──CI Folder
| ├── deployment-file.yaml
├──server
| ├── Dockerfile.prod
| └── All the other files for building the server
在deployment-file.yaml中,我叫:
docker build -t dizzy/dizzy-server:latest -f ./server/Dockerfile.prod ./server
我已经尝试过使用../server等相对路径进行此更改,但是Docker不会接受。这给了我一个unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat
的新错误。
执行此操作的正确方法是什么,或者我需要将该Deployment-file.yaml移至根目录...