-
Notifications
You must be signed in to change notification settings - Fork 1
GCP
YukiOnishi edited this page May 25, 2024
·
4 revisions
🔸これでいい
gcloud auth configure-docker asia-northeast1-docker.pkg.dev
docker build --platform linux/amd64 -t asia-northeast1-docker.pkg.dev/geek-picks-staging/trend-article-crawler/latest -f Dockerfile.trend-article-crawler .
- https://stackoverflow.com/questions/66920645/exec-format-error-when-running-containers-build-with-apple-m1-chip-arm-based
docker push asia-northeast1-docker.pkg.dev/geek-picks-staging/trend-article-crawler/latest
- Artifact Registryにサービスを作成
- そのサービスと同じ名前のdocker imageをローカルに作成
🔸これでいい
gcloud auth configure-docker asia-northeast1-docker.pkg.dev
docker build --platform linux/amd64 -t asia-northeast1-docker.pkg.dev/geek-picks-staging/trend-article-crawler/latest -f Dockerfile.trend-article-crawler .
- https://stackoverflow.com/questions/66920645/exec-format-error-when-running-containers-build-with-apple-m1-chip-arm-based
docker push asia-northeast1-docker.pkg.dev/geek-picks-staging/trend-article-crawler/latest
- pushしたらcloud run jobを指定
- ジョブを作成で、コンテナイメージのURLをArtifact Registryにpushしたimageを指定する
環境変数を指定して、作成したら終わり
権限設定が必要 https://cloud.google.com/build/docs/deploying-builds/deploy-cloud-run?hl=ja