dizzy
dizzy

Reputation: 1277

Docker unable to prepare context within directory

So! I'm setting up a CI/CD system which has it's own folder and yaml file. Within that folder, I need to call docker build. However, I continue to get the following error:

unable to prepare context: path "./server" not found.

Here's the structure of my app:

├──CI Folder
|   ├── deployment-file.yaml
├──server
|   ├── Dockerfile.prod
|   └── All the other files for building the server

Within the deployment-file.yaml, I'm calling:

docker build -t dizzy/dizzy-server:latest -f ./server/Dockerfile.prod ./server

I've tried every variation of this with relative paths like ../server, etc, but Docker won't take it. It gives me a new error of unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat.

What's the proper way to do this or am I required to move that deployment-file.yaml to the root directory...

Upvotes: 1

Views: 1890

Answers (0)

Related Questions