问题描述
我想创建一个 docker 镜像.这是我的工作目录:dockerfile.in test.json test.py
i want to create a docker image. this is my work directory: dockerfile.in test.json test.py
这是我的 dockerfile:
and this is my dockerfile:
copy ./test.json /home/test.json copy ./test.py /home/test.py run python test.py
当我启动这个命令时:docker build -f dockerfile.in -t 637268723/test:1.0 .
它给了我这个错误:
`step 1/5 : copy ./test.json /home/test.json ---> using cache ---> 6774cd225d60 step 2/5 : copy ./test.py /home/test.py copy failed: stat /var/lib/docker/tmp/docker-builder428014112/test.py: no such file or directory`
谁能帮帮我?
推荐答案
你应该把这些文件和dockerfile放在同一个目录下.
you should put those files into the same directory with dockerfile.