错误,“无法使用前端 dockerfile.v0 解决" [英] An error, "failed to solve with frontend dockerfile.v0"
本文介绍了错误,“无法使用前端 dockerfile.v0 解决"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为我的 Gatsby 应用程序构建我的 Docker 映像.每当我运行命令 docker build .-t gatsbyapp
,它给了我一个错误:
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:
failed to solve with frontend dockerfile.v0: failed to build LLB:
failed to compute cache key: "/.env" not found: not found
同时我的 Dockerfile 如下所示:
Meanwhile my Dockerfile is shown below:
FROM node:13
WORKDIR /app
COPY package.json .
RUN yarn global add gatsby-cli
RUN yarn install
COPY gatsby-config.js .
COPY .env .
EXPOSE 8000
CMD ["gatsby","develop","-H","0.0.0.0"]
推荐答案
我遇到了同样的问题,我所要做的就是将 Docker 配置文件名大写:
I had the same issue and all I had to do was to capitalize the Docker configuration filename:
dockerfile
>没用
Dockerfile
>确实有效
这篇关于错误,“无法使用前端 dockerfile.v0 解决"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文