我还没有在我的 M1 Macbook 上安装 Rosetta。安装了 Docker 和所有的 deps,这甚至工作了几次,但不确定是什么突然导致了这个错误:
Starting to run the app using configuration 'Cloud Run: Run/Debug Locally' from .vscode/launch.json...
To view more detailed logs, go to Output channel : "Cloud Run: Run/Debug Locally - Detailed"
Dependency check started
Dependency check succeeded
Starting minikube, this may take a while.............
minikube successfully started
The minikube profile 'cloud-run-dev-internal' has been scheduled to stop automatically after exiting Cloud Code. To disable this on future deployments, set autoStop to false in your launch configuration /Users/myname/Code/myprojectAPI/.vscode/launch.json
Configuring minikube gcp-auth addon
Using GCP project 'myproject-com' with minikube gcp-auth
Update initiated
Build started for artifact myprojectapi
Build completed for artifact myprojectapi
Deploy started
Deploy completed
Status check started
Resource pod/myprojectapi-8695998b94-9lk7d status updated to In Progress
Resource pod/myprojectapi-8695998b94-9lk7d status updated to In Progress
Resource deployment/myprojectapi status failed with waiting for rollout to finish: 0 of 1 updated replicas are available...
Status check failed
The image was built but failed to start on the cluster. Because you are on an ARM64 machine, it is likely that you built an ARM64 image for an x86_64 cluster.
Update failed with error code STATUSCHECK_CONTAINER_TERMINATED
1/1 deployment(s) failed
Skaffold exited with code 1.
Cleaning up...
Finished clean up.
Dockerfile
:
FROM gcr.io/google.com/cloudsdktool/cloud-sdk:slim
RUN set -ex; \
apt-get -y update; \
curl -fsSL https://deb.nodesource.com/setup_17.x | bash -; \
apt-get -y install nodejs; \
apt-get -y install ghostscript; \
apt-get -y install pngquant; \
rm -rf /var/lib/apt/lists/*
# Create and change to the app directory.
WORKDIR /usr/src/app
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
# Copying this separately prevents re-running npm install on every code change.
COPY package*.json ./
# Install dependencies.
# If you add a package-lock.json speed your build by switching to 'npm ci'.
RUN npm ci --only=production
# RUN npm install --production
# Copy local code to the container image.
COPY . ./
# Run the web service on container startup.
CMD [ "npm", "start" ]
我正在使用 Cloud Code 扩展在 VS Code 中部署“Cloud Run Emulator”。
我究竟做错了什么?