gcloud dockerでpushするとエラー

Dockerその他

gcloud dockerでimageをpushしようとすると「ERROR: gcloud crashed (TypeError): a bytes-like object is required, not ‘str’」がでてしまったので、その対処方法です。

↓エラー

$ gcloud docker -- push ホスト/イメージ:latest
WARNING: `gcloud docker` will not be supported for Docker client versions above 18.03.

As an alternative, use `gcloud auth configure-docker` to configure `docker` to
use `gcloud` as a credential helper, then use `docker` as you would for non-GCR
registries, e.g. `docker pull gcr.io/project-id/my-image`. Add
`--verbosity=error` to silence this warning: `gcloud docker
--verbosity=error -- pull gcr.io/project-id/my-image`.

See: https://cloud.google.com/container-registry/docs/support/deprecation-notices#gcloud-docker

ERROR: gcloud crashed (TypeError): a bytes-like object is required, not 'str'

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics

解決方法

gcloudじゃなくて普通のdockerコマンドを使えばOK

$ docker push ホスト/イメージ:バージョン
©2018 LLC Shimer-System.
image/svg+xml