Failed To Resolve With FrontEnd DockerFIle.v0

后端 未结 9 2158
春和景丽
春和景丽 2021-01-17 10:49

I was trying to build my Docker image for my Gatsby Application. Whenever I run the command docker build . -t gatsbyapp, it gives me an error:

f         


        
相关标签:
9条回答
  • 2021-01-17 11:02

    Was facing the same issue despite naming the file as Dockerfile. I restarted the docker and it worked for me. So, please try the same. Thanks!

    0 讨论(0)
  • 2021-01-17 11:02

    I had this issue while trying to build my container running inside Windows Subsystem for Linux (WSL) and all I had to do was close the terminal and reopen my window and my issue was solved.

    0 讨论(0)
  • 2021-01-17 11:05

    In my case I was trying to copy over wp-content from my current directory, inside the docker image I was building. Like so:

    FROM wordpress:latest
    
    # Copy wp-content
    COPY ./wp-content/ ./var/www/html/wp-content/
    

    However, I noticed that I had a .dockerignore file, which explicitly was told to ignore wp-content.

    When I removed wp-content/ from .dockerignore it worked fine.

    0 讨论(0)
  • 2021-01-17 11:09

    In my case, I had two problems:

    1. I missed the . in the end of the command that gives the context option, and
    2. I have a ".txt" extension in the file name of the Dockerfile.

    After these two adjustments, all worked as expected.

    0 讨论(0)
  • 2021-01-17 11:12

    I had the same issue and all I had to do was to capitalize the docker configuration filename

    dockerfile > didn't work

    Dockerfile > did work

    0 讨论(0)
  • 2021-01-17 11:16

    Make sure you .dockerignore doesn't match your file.

    0 讨论(0)
提交回复
热议问题