docker - 自动图像生成检测失败。错误:找不到组件映射。考虑将Dockerfile添加到工作区,然后重试

标签 docker visual-studio-code google-cloud-platform dockerfile google-cloud-run

我正在使用 Visual Studio Code Cloud Code 扩展名。当我尝试“部署到云运行”时,出现此错误:

Automatic image build detection failed. Error: Component map not found. Consider adding a Dockerfile to the workspace and try again.


但是我已经有了一个Dockerfile:
# Python image to use.
FROM python:3.8

# Set the working directory to /app
WORKDIR /app

# copy the requirements file used for dependencies
COPY requirements.txt .

# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt

# Install ptvsd for debugging
RUN pip install ptvsd

# Copy the rest of the working directory contents into the container at /app
COPY . .

# Run app.py when the container launches
ENTRYPOINT ["python", "-m", "ptvsd", "--port", "3000", "--host", "0.0.0.0", "manage.py", "runserver", "--noreload"]
请问如何解决?

最佳答案

我无法重现该问题,但我向Cloud Code团队进行了检查,听起来gcloud可能存在根本问题,这不是你的错。
我认为您不会再看到此错误,但是如果您再次看到此错误,那么可以在Cloud Code VS Code repo上提交问题,这样我们可以收集更多信息并仔细检查,那就太好了。
这确实表明我们需要改进错误消息。我已经提交了一个错误来修复有关这种情况的消息。

关于docker - 自动图像生成检测失败。错误:找不到组件映射。考虑将Dockerfile添加到工作区,然后重试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63887379/

相关文章:

docker - 无法在Docker Ubuntu镜像中安装软件包

visual-studio-code - 在 VS code 中运行 Julia REPL 中的 md 文件

Kubernetes 安全漏洞

google-cloud-platform - 谷歌云 : how to add role for service user to an individual bucket?

google-compute-engine - GCE/kubernetes的更改-未显示完成的Pod

docker - 如何将docker端口2375从virtualbox转发到主机OS Windows 10

Docker Compose 使用缓存构建命令,并且在复制到 docker 时不拾取更改的文件

docker - 如何查看在我的 Google Cloud Platform Cloud Run 服务上运行的文件?

visual-studio-code - 如何在 Visual Studio Code 中禁用抗锯齿?

java - VSCode 错误 : JavaFX runtime components are missing, 并且需要运行此应用程序