无法使用GCP容器注册表中的映像启动Docker容器

时间:2018-07-10 08:04:52

标签: docker google-cloud-platform docker-compose google-container-registry

我正在尝试使用Google Cloud Platform的Container Registry中的图像启动容器。但它会返回此错误消息

const languages:Routes = Object.getOwnPropertyNames(environment.trader.langList).map(path => {
  return {
    path, component: OutComponent,
    children: [
      { path: 'place-bet', loadChildren: '../../desktop/placebet/placebet.module#PlacebetModule' },
      { path: 'games', loadChildren: '../../desktop/games/games.module#GamesModule' },
      { path: 'dashboard', loadChildren: '../../desktop/dashboard/dashboard.module#DashboardModule' }]
  };
})
debugger;

const OutRoutes: Routes = [
  ...languages
];

export const OutRouter = RouterModule.forChild(OutRoutes);

当我运行Error: Status 405 trying to pull repository project/image: "v1 Registry API is disabled. If you are not explicitly using the v1 Registry API, it is possible your v2 image could not be found. Verify that your image is available, or retry with `dockerd --disable-legacy-registry`." 时,它还会返回相同的错误。我可以毫无问题地将构建的映像推送到同一注册表,但是由于某些原因不能拉。

我对Docker和docker-compose还是很陌生,所以我真的不确定哪一部分是错误的。这些是我的docker-compose文件和Docker版本,如果有帮助的话。预先谢谢你。

docker pull

version: '2'
services:
  web:
    image: 'asia.gcr.io/project/image:${tag}'

该标记存在于注册表中

$ docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:10:36 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:10:36 2017
 OS/Arch:      linux/amd64
 Experimental: false

1 个答案:

答案 0 :(得分:2)

我升级了Docker和docker-compose,现在可以正常使用了。不知道问题的实际原因是什么,因为我的其他服务器仍使用上述版本,并且工作正常。 只是想把这个留给其他有这个问题的人。

相关问题