将图像推送到lightsail容器注册表时出现问题



我开始在Lightsail Containers中部署一个应用程序。我已经从控制台创建了服务,并从公共存储库运行了自定义映像。现在,我正试图使用aws-cli从主机推送我自己的映像,但当我运行推送容器映像时,控制台中不会显示任何结果。无错误,无成功响应

命令:

aws lightsail push-container-image --region us-east-1 --service-name container-service-1 --image mystaticwebsite --profile rg --label mystaticwebsite --debug

调试日志:

2021-08-17 17:37:01238-主线程-awscli.clidriver-DEBUG-CLI版本:aws-CLI/2.2.29 Python/3.8.8 Linux/5.4.0-80-generic exe/x86_64.ubuntu.202021-08-17 17:37:01238-MainThread-awscli.clidriver-DEBUG-输入到CLI的参数:["lightsail","push container image","--region","us-east-1","--服务名称","container-service-1","--image","mystaticwebsite","--profile","rg',"--label","mystaticwebite","-DEBUG"]2021-08-17 17:37:01244-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<0x7f86ddab7ee0处的函数add_s3>2021-08-17 17:37:01244-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<函数add_ddb在0x7f86ddc784c0>2021-08-17 17:37:01245-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<<的绑定方法BasicCommon.add_command;类"awscli.customize.configure.ConfigureCommand">gt;2021-08-17 17:37:01245-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<0x7f86ddc99ee0处的函数change_name>2021-08-17 17:37:01245-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<0x7f86ddca1ee0处的函数change_name>2021-08-17 17:37:01245-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<函数alias_opsworks_cm在0x7f86ddac7940>2021-08-17 17:37:01245-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<函数add_history_ commands在0x7f86ddc41280>2021-08-17 17:37:01245-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<<的绑定方法BasicCommon.add_command;类"awscli.customize.devcommands.CLIDevCommand">gt;2021-08-17 17:37:01245-MainThread-botocore.hooks-DEBUG-Event building-command-table.main:调用handler<函数add_ waiters在0x7f86ddabfb80>2021-08-17 17:37:01245-MainThread-botocore.loaders-DEBUG-加载JSON文件:/usr/aws-cli/v2/2.2.29/dist/awscli/data/cli.JSON2021-08-17 17:37:01247-MainThread-botocore.hooks-DEBUG-解析的事件顶级参数:调用处理程序<0x7f86ddb6bdc0处的函数resolve_types>2021-08-17 17:37:01247-MainThread-botocore.hooks-DEBUG-解析的事件顶级参数:调用处理程序<0x7f86ddb71940处的函数no_sign_request>2021-08-17 17:37:01247-MainThread-botocore.hooks-DEBUG-解析的事件顶级参数:调用处理程序<函数resolve_verify_ssl在0x7f86ddb718b0>2021-08-17 17:37:01247-MainThread-botocore.hooks-DEBUG-解析的事件顶级参数:调用处理程序<函数resolve_cli_read_timeout在0x7f86ddb71a60>2021-08-17 17:37:01247-MainThread-botocore.hooks-DEBUG-解析的事件顶级参数:调用处理程序<函数resolve_cli_connect_timeout在0x7f86ddb719d0>2021-08-17 17:37:01247-MainThread-botocore.hooks-DEBUG-解析的事件顶级参数:调用处理程序<0x7f86dd9e0e40处dict对象的内置方法更新>2021-08-17 17:37:01248-MainThread-botocore.session-DEBUG-将配置文件的配置变量设置为"rg"2021-08-17 17:37:01248-MainThread-botocore.session-DEBUG-将区域的配置变量设置为"us-east-1"2021-08-17 17:37:01248-MainThread-awscli.clidriver-DEBUG-CLI版本:aws-CLI/2.2.29 Python/3.8.8 Linux/5.4.0-80-generic exe/x86_64.ubuntu.20 prompt/off2021-08-17 17:37:01248-MainThread-awscli.clidriver-DEBUG-输入到CLI的参数:["lightsail","push container image","--region","us-east-1","--服务名称","container-service-1","--image","mystaticwebsite","--profile","rg',"--label","mystaticwebite","-DEBUG"]2021-08-17 17:37:01248-MainThread-botocore.hooks-DEBUG-事件会话初始化:调用处理程序<函数add_timestamp_parser在0x7f86ddab9550>2021-08-17 17:37:01248-MainThread-botocore.hooks-DEBUG-事件会话初始化:调用处理程序<函数register_ uri_param_handler在0x7f86de4d6e50>2021-08-17 17:37:01248-MainThread-botocore.hooks-DEBUG-事件会话初始化:调用处理程序<函数add_binary_formater在0x7f86dda280d0>2021-08-17 17:37:01248-MainThread-botocore.hooks-DEBUG-事件会话初始化:调用处理程序<0x7f86de552280处的函数no_pager_handler>2021-08-17 17:37:01248-MainThread-botocore.hooks-DEBUG-事件会话初始化:调用处理程序<函数inject_assume_role_provider_cache在0x7f86de4be940处>2021-08-17 17:37:01249-主线程-botocore.utils-调试-IMDS终点:http://169.254.169.254/2021-08-17 17:37:01251-MainThread-botocore.credentials-DEBUG-由于显式设置了配置文件名称,正在跳过环境变量凭据检查。2021-08-17 17:37:01251-MainThread-botocore.hooks-DEBUG-事件会话初始化:调用处理程序<0x7f86ddc41160处的函数attach_history_handler>2021-08-17 17:37:01251-MainThread-botocore.hooks-DEBUG-事件会话初始化:调用处理程序<函数inject_json_file_cache在0x7f86ddc763a0>2021-08-17 17:37:01259-MainThread-botocore.loaders-DEBUG-正在加载JSON文件:/usr/aws-cli/v2/2.2.29/dist/botocore/data/lingsail/2016-11-28/service-2.JSON2021-08-17 17:37:01282-MainThread-botocore.hooks-DEBUG-事件构建-命令表.lightsail:调用处理程序<0x7f86dda28ee0处的函数inject_ commands>2021-08-17 17:37:01282-MainThread-botocore.hooks-DEBUG-事件构建-命令表.lightsail:调用处理程序<函数add_ waiters在0x7f86ddabfb80>2021-08-17 17:37:01288-MainThread-botocore.hooks-DEBUG-事件构建-命令表.lightsail_push-container-image:调用处理程序<函数add_ waiters在0x7f86ddabfb80>2021-08-17 17:37:01289-MainThread-botocore.hooks-DEBUG-Event load-cli-arg.custom.push-container-image.service-name:调用处理程序<0x7f86dd1a1c1c10>处的awscli.paramfile.URIArgumentHandler对象;2021-08-17 17:37:01289-MainThread-botocore.hooks-DEBUG-Event process-cli-arg.custom.push-container-image:调用处理程序<awscli.argprocess.ParamShorthandParser对象位于0x7f86de498160>2021-08-17 17:37:01289-MainThread-botocore.hooks-DEBUG-Event load-cli-arg.custom.push-container-image.image:调用处理程序<0x7f86dd1a1c1c10>处的awscli.paramfile.URIArgumentHandler对象;2021-08-17 17:37:01289-MainThread-botocore.hooks-DEBUG-Event process-cli-arg.custom.push-container-image:调用处理程序<awscli.argprocess.ParamShorthandParser对象位于0x7f86de498160>2021-08-17 17:37:01289-MainThread-botocore.hooks-DEBUG-Event load-cli-arg.custom.push-container-image.label:调用处理程序<0x7f86dd1a1c1c10>处的awscli.paramfile.URIArgumentHandler对象;2021-08-17 17:37:01289-MainThread-botocore.hooks-DEBUG-Event process-cli-arg.custom.push-container-image:调用处理程序<awscli.argprocess.ParamShorthandParser对象位于0x7f86de498160>

知道为什么不起作用吗?

问候!

我刚才在Ubuntu 20.04上遇到了这个问题。在命令上运行strace后,发现这是由于在运行lightailctl插件时出现EACCES (Permission Denied)错误,而该插件没有进入控制台输出。

11067 execve("/usr/local/bin/lightsailctl", ["lightsailctl", "--plugin", "--input-stdin"], 0x557d454e91c0 /* 68 vars */) = -1 EACCES (Permission denied)

我通过使lightsailctl插件可执行来解决这个问题,如下所示:

chmod +x /usr/local/bin/lightsailctl

我也面临着同样的问题,但不知怎么的,我发现并能够在光剑上推送图像,并能够部署容器:-

aws lightsail推送容器image——region ap-west-1——服务名称invent——标签库存——image invent_app:最新

我在Github操作中有这个步骤:

run: |
curl "https://s3.us-west-2.amazonaws.com/lightsailctl/latest/linux-arm64/lightsailctl" -o "/usr/local/bin/lightsailctl"
sudo chmod +x /usr/local/bin/lightsailctl

push命令什么也不返回,即使有debug选项,所以我添加了lightsailctl --version,得到了一个错误

/usr/local/bin/lightsailctl: cannot execute binary file: Exec format error

原来我用错了二进制,应该是amd64而不是arm64