草庐IT

amazon-web-services - "Invalid configuration for registry"执行时出错 "eb local run"

coder 2023-05-06 原文

我认为这是一个很容易解决的问题,但我似乎无法解决它!我花了很多时间在 Google/SO 上寻找任何线索,但找不到解决方案。

执行 eb local run 时,出现此错误:

Invalid configuration for registry

$ eb local run                        
ERROR: InvalidConfigFile :: Invalid configuration for registry 12345678.dkr.ecr.eu-west-1.amazonaws.com

我的Dockerrun.aws.json中的图片行如下:

{
  "AWSEBDockerrunVersion": 2,
  "volumes": [
      {
          "name": "frontend",
          "host": {
              "sourcePath": "/var/app/current/frontend"
          }
      },
      {
          "name": "backend",
          "host": {
              "sourcePath": "/var/app/current/backend"
          }
      },
      {
        "name": "nginx-proxy-conf",
        "host": {
          "sourcePath": "/var/app/current/config/nginx"
        }
      },
      {
        "name": "nginx-proxy-content",
        "host": {
          "sourcePath": "/var/app/current/content/"
        }
      },
      {
        "name": "nginx-proxy-ssl",
        "host": {
          "sourcePath": "/var/app/current/config/ssl"
        }
      }

  ],
    "containerDefinitions": [
        {
            "name": "backend",
            "image": "123456.dkr.ecr.eu-west-1.amazonaws.com/backend:latest",
            "Update": "true",
            "essential": true,
            "memory": 512,
            "mountPoints": [
                {
                    "containerPath": "/app/backend",
                    "sourceVolume": "backend"
                }
            ],
            "portMappings": [
                {
                    "containerPort": 4000,
                    "hostPort": 4000
                }
            ],
            "environment": [
                {
                    "name": "PORT",
                    "value": "4000"
                },
                {
                    "name": "MIX_ENV",
                    "value": "dev"
                },
                {
                    "name": "PG_PASSWORD",
                    "value": "xxsaxaax"
                },
                {
                    "name": "PG_USERNAME",
                    "value": "
                },
                {
                    "name": "PG_HOST",
                    "value": "123456.dsadsau89das.eu-west-1.rds.amazonaws.com"
                },
                {
                    "name": "FE_URL",
                    "value": "http://develop1.com"
                }


            ]
        },
        {
            "name": "frontend",
            "image": "123456.dkr.ecr.eu-west-1.amazonaws.com/frontend:latest",
            "Update": "true",
            "essential": true,
            "memory": 512,
            "links": [
                "backend"
            ],
            "command": [
                "npm",
                "run",
                "production"
            ],
            "mountPoints": [
                {
                    "containerPath": "/app/frontend",
                    "sourceVolume": "frontend"
                }
            ],
            "portMappings": [
                {
                    "containerPort": 3000,
                    "hostPort": 3000
                }
            ],
            "environment": [
                {
                    "name": "REDIS_HOST",
                    "value": "www.eample.com"
                }
            ]
        },
        {
          "name": "nginx-proxy",
          "image": "nginx",
          "essential": true,
          "memory": 128,
          "portMappings": [
            {
              "hostPort": 80,
              "containerPort": 3000
            }
          ],
          "links": [
              "backend",
              "frontend"
          ],
          "mountPoints": [
            {
              "sourceVolume": "nginx-proxy-content",
              "containerPath": "/var/www/html"
            },
            {
              "sourceVolume": "awseb-logs-nginx-proxy",
              "containerPath": "/var/log/nginx"
            },
            {
              "sourceVolume": "nginx-proxy-conf",
              "containerPath": "/etc/nginx/conf.d",
              "readOnly": true
            },
            {
              "sourceVolume": "nginx-proxy-ssl",
              "containerPath": "/etc/nginx/ssl",
              "readOnly": true
            }
          ]
        }
    ],
    "family": ""
}

最佳答案

您的 docker-registry 身份验证配置文件似乎已损坏。在您的家中,此文件 ~/.docker/config.json 应类似于:

{
    "auths": {
        "https://1234567890.dkr.ecr.us-east-1.amazonaws.com": {
            "auth": "xxxxxx"
        }
    }
}

使用docker login命令生成(与aws ecr get-login相关)

检查一下。我这样说是因为您正在输入异常 here :

for registry, entry in six.iteritems(entries):
    if not isinstance(entry, dict):
        # (...)
        if raise_on_error:
            raise errors.InvalidConfigFile(
                'Invalid configuration for registry {0}'.format(registry)
            )
        return {}

关于amazon-web-services - "Invalid configuration for registry"执行时出错 "eb local run",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44027709/

有关amazon-web-services - "Invalid configuration for registry"执行时出错 "eb local run"的更多相关文章

  1. ruby - 在 Ruby 程序执行时阻止 Windows 7 PC 进入休眠状态 - 2

    我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0

  2. ruby-on-rails - rails : "missing partial" when calling 'render' in RSpec test - 2

    我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou

  3. ruby-on-rails - 由于 "wkhtmltopdf",PDFKIT 显然无法正常工作 - 2

    我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-

  4. ruby - 检查 "command"的输出应该包含 NilClass 的意外崩溃 - 2

    为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar

  5. ruby-on-rails - 无法在centos上安装therubyracer(V8和GCC出错) - 2

    我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e

  6. ruby-on-rails - rails : save file from URL and save it to Amazon S3 - 2

    从给定URL下载文件并立即将其上传到AmazonS3的更直接的方法是什么(+将有关文件的一些信息保存到数据库中,例如名称、大小等)?现在,我既不使用Paperclip,也不使用Carrierwave。谢谢 最佳答案 简单明了:require'open-uri'require's3'amazon=S3::Service.new(access_key_id:'KEY',secret_access_key:'KEY')bucket=amazon.buckets.find('image_storage')url='http://www.ex

  7. ruby-on-rails - 迷你测试错误 : "NameError: uninitialized constant" - 2

    我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test

  8. ruby-on-rails - 相关表上的范围为 "WHERE ... LIKE" - 2

    我正在尝试从Postgresql表(table1)中获取数据,该表由另一个相关表(property)的字段(table2)过滤。在纯SQL中,我会这样编写查询:SELECT*FROMtable1JOINtable2USING(table2_id)WHEREtable2.propertyLIKE'query%'这工作正常:scope:my_scope,->(query){includes(:table2).where("table2.property":query)}但我真正需要的是使用LIKE运算符进行过滤,而不是严格相等。然而,这是行不通的:scope:my_scope,->(que

  9. 使用 ACL 调用 upload_file 时出现 Ruby S3 "Access Denied"错误 - 2

    我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file

  10. ruby - 安装 Ruby 时遇到问题(无法下载资源 "readline--patch") - 2

    当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub

随机推荐