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

前端 未结 18 1988
余生分开走
余生分开走 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 01:00

    In my case, it was the comment line that was messing up the COPY command

    I removed the comment after the COPY command and placed it to a dedicated line above the command. Surprisingly it resolved the issue.

    Faulty Dockerfile command

    COPY qt-downloader .     # https://github.com/engnr/qt-downloader -> contains the script to auto download qt for different architectures and versions
    

    Working Dockerfile command

    # https://github.com/engnr/qt-downloader -> contains the script to auto download qt for different architectures and versions
    COPY qt-downloader .     
    

    Hope it helps someone.

提交回复
热议问题