0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Docker ImageをGCP Container RegistryにPushする方法

0
Posted at

はじめに

GCP Container RegistryにDocker Imageをpushする方法の備忘録です。

手順

$ gcloud config list

[core] account = hogehoge@example.com disable_usage_reporting = False project = hogehoge

$ gcloud auth configure-docker

The following settings will be added to your Docker config file
located at [/Users/user/.docker/config.json]: { "credHelpers": { "gcr.io": "gcloud", "us.gcr.io": "gcloud", "eu.gcr.io": "gcloud", "asia.gcr.io": "gcloud", "staging-k8s.gcr.io": "gcloud", "marketplace.gcr.io": "gcloud" } }

Do you want to continue (Y/n)?

→yes

$ docker build -f ~/Dockerfile -t [image name] .

Successfully built ●●●● Successfully tagged ●●●●:latest

$ docker images

→buildしたimageを確認できる。

$ docker tag [image name] gcr.io/~/[image name]:latest
$ gcloud docker -- push gcr.io/~/[image name]

8bac3adefc84: Pushed 9317358e9e38: Pushed

→成功です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?