Can't create a docker image for COPY failed: stat /var/lib/docker/tmp/docker-builder error

前端 未结 18 1980
余生分开走
余生分开走 2020-12-03 00:07

I want to create a docker image. This is my work directory: Dockerfile.in test.json test.py

And this is my Dockerfile:

COPY ./test.json /home/tes         


        
18条回答
  •  天命终不由人
    2020-12-03 00:59

    1. Q1: Check your .dockerignore file in build path, the files or dir you want to copy may be in the ignore file list!
    2. Q2: The COPY directive is based on the context in which you are building the image, so be aware of any problems with the directory where you are currently building the image! See: https://docs.docker.com/engine/reference/builder/#copy

提交回复
热议问题