命令行部署Google Cloud Run失败:容器导入超时,资源就绪超期
Google Cloud Run部署失败求助
我尝试通过命令行将服务部署到Google Cloud Run,但部署失败,报错信息如下:
X Deploying... Revision 'XXXXXXXXX' is not ready and cannot serve traffic. The service has encountered an error during container import. Please try again later. Resource readiness deadline exceeded. X Creating Revision... The service has encountered an error during container import. Please try again later. Resource readiness deadline exceeded. . Routing traffic... ✓ Setting IAM Policy... Deployment failed ERROR: (gcloud.run.deploy) The service has encountered an error during container import. Please try again later. Resource readiness deadline exceeded.
我使用的部署命令:
gcloud run deploy my-service --quiet --platform managed --allow-unauthenticated --region asia-southeast1 --image docker.io/<username>/<imgname> --project <projectid> --memory 1548M --concurrency 1 --platform managed
我的Google Cloud SDK版本信息:
Google Cloud SDK 420.0.0 beta 2023.02.24 bq 2.0.86 bundled-python3-unix 3.9.16 core 2023.02.24 gcloud-crc32c 1.0.0 gsutil 5.20
Dockerfile内容:
FROM python:3.9-bullseye ENV PYTHONUNBUFFERED True ENV APP_HOME /app ENV TF_CPP_MIN_LOG_LEVEL "3" WORKDIR $APP_HOME COPY . ./ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -y && apt-get install -y ffmpeg libsm6 libxext6 libgl1 python3-opencv libgl1-mesa-glx RUN pip install --no-cache-dir -r requirements.txt CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
补充信息:
- 该镜像在本地Docker引擎中可正常运行
- Docker Hub上的镜像详情:
COMPRESSED SIZE - 3.54 GB OS/ARCH - linux/amd64
内容的提问来源于stack exchange,提问作者dev-dumi
相关产品推荐
相关产品推荐

