I have a dead-simple project with the following structure:
docker/
|- src/
| |- config.json
|
|- Dockerfile
The contents of the json file:
{
"setting": "value"
}
The contents of the Dockerfile:
FROM python:3.5
ADD src/config.json /testapp/config.json # Config
I run this build command:
docker build -t testapp:dev .
And get this result:
Sending build context to Docker daemon 4.608 kB
Step 1 : FROM python:3.5
---> 1d0326469b55
Step 2 : ADD src/config.json /testapp/config.json
lstat testapp/config.json: no such file or directory
Why is this failing? Why is it that the not-found item is testapp/config.json
? In the past I've used this exact construct to, for instance, copy requirements.txt
files into temporary working directories. I don't understand what I'm missing about how ADD
works that is causing this to fail. Can anyone explain?