我试图为我的盖茨比应用程序构建Docker映像。每当我运行命令docker build . -t gatsbyapp
时,它都会给我一个错误:
failed to solve with frontend dockerfile.v0: failed to build LLB:
failed to compute cache key: "/.env" not found: not found
同时我的Dockerfile如下所示:
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"]