'Problems pushing images to lightsail containers registry
I'm starting to deploy an app in Lightsail Containers. I've created the service from the console and ran custom images from public repositories. Now, I'm trying to push my own image from my host using the aws cli, but when I run push-container-image no results are shown in the console. No error, no successful response
Command:
aws lightsail push-container-image --region us-east-1 --service-name container-service-1 --image mystaticwebsite --profile rg --label mystaticwebsite --debug
Debug log:
2021-08-17 17:37:01,238 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.2.29 Python/3.8.8 Linux/5.4.0-80-generic exe/x86_64.ubuntu.20 2021-08-17 17:37:01,238 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['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:01,244 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x7f86ddab7ee0> 2021-08-17 17:37:01,244 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x7f86ddc784c0> 2021-08-17 17:37:01,245 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>> 2021-08-17 17:37:01,245 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7f86ddc99ee0> 2021-08-17 17:37:01,245 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7f86ddca1ee0> 2021-08-17 17:37:01,245 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function alias_opsworks_cm at 0x7f86ddac7940> 2021-08-17 17:37:01,245 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_history_commands at 0x7f86ddc41280> 2021-08-17 17:37:01,245 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.devcommands.CLIDevCommand'>> 2021-08-17 17:37:01,245 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_waiters at 0x7f86ddabfb80> 2021-08-17 17:37:01,245 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/aws-cli/v2/2.2.29/dist/awscli/data/cli.json 2021-08-17 17:37:01,247 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_types at 0x7f86ddb6bdc0> 2021-08-17 17:37:01,247 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function no_sign_request at 0x7f86ddb71940> 2021-08-17 17:37:01,247 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_verify_ssl at 0x7f86ddb718b0> 2021-08-17 17:37:01,247 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_read_timeout at 0x7f86ddb71a60> 2021-08-17 17:37:01,247 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_connect_timeout at 0x7f86ddb719d0> 2021-08-17 17:37:01,247 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <built-in method update of dict object at 0x7f86dd9e0e40> 2021-08-17 17:37:01,248 - MainThread - botocore.session - DEBUG - Setting config variable for profile to 'rg' 2021-08-17 17:37:01,248 - MainThread - botocore.session - DEBUG - Setting config variable for region to 'us-east-1' 2021-08-17 17:37:01,248 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.2.29 Python/3.8.8 Linux/5.4.0-80-generic exe/x86_64.ubuntu.20 prompt/off 2021-08-17 17:37:01,248 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['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:01,248 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_timestamp_parser at 0x7f86ddab9550> 2021-08-17 17:37:01,248 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7f86de4d6e50> 2021-08-17 17:37:01,248 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_binary_formatter at 0x7f86dda280d0> 2021-08-17 17:37:01,248 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function no_pager_handler at 0x7f86de552280> 2021-08-17 17:37:01,248 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7f86de4be940> 2021-08-17 17:37:01,249 - MainThread - botocore.utils - DEBUG - IMDS ENDPOINT: http://169.254.169.254/ 2021-08-17 17:37:01,251 - MainThread - botocore.credentials - DEBUG - Skipping environment variable credential check because profile name was explicitly set. 2021-08-17 17:37:01,251 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7f86ddc41160> 2021-08-17 17:37:01,251 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_json_file_cache at 0x7f86ddc763a0> 2021-08-17 17:37:01,259 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/aws-cli/v2/2.2.29/dist/botocore/data/lightsail/2016-11-28/service-2.json 2021-08-17 17:37:01,282 - MainThread - botocore.hooks - DEBUG - Event building-command-table.lightsail: calling handler <function inject_commands at 0x7f86dda28ee0> 2021-08-17 17:37:01,282 - MainThread - botocore.hooks - DEBUG - Event building-command-table.lightsail: calling handler <function add_waiters at 0x7f86ddabfb80> 2021-08-17 17:37:01,288 - MainThread - botocore.hooks - DEBUG - Event building-command-table.lightsail_push-container-image: calling handler <function add_waiters at 0x7f86ddabfb80> 2021-08-17 17:37:01,289 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.push-container-image.service-name: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f86dd1a1c10> 2021-08-17 17:37:01,289 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.push-container-image: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f86de498160> 2021-08-17 17:37:01,289 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.push-container-image.image: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f86dd1a1c10> 2021-08-17 17:37:01,289 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.push-container-image: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f86de498160> 2021-08-17 17:37:01,289 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.push-container-image.label: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f86dd1a1c10> 2021-08-17 17:37:01,289 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.push-container-image: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f86de498160>
Any idea on why this is not working?
Regards!
Solution 1:[1]
I had this exact issue on Ubuntu 20.04 just now. After running strace
on the command, it turned out that this was due to an EACCES (Permission Denied)
error when running the lightsailctl plugin which wasn't making it to the console output.
11067 execve("/usr/local/bin/lightsailctl", ["lightsailctl", "--plugin", "--input-stdin"], 0x557d454e91c0 /* 68 vars */) = -1 EACCES (Permission denied)
I resolved the issue by making the lightsailctl plugin executable like so:
chmod +x /usr/local/bin/lightsailctl
Solution 2:[2]
I was also facing the same issue, but somehow I figured and able to push image on lightsail and able to deploy the container:-
aws lightsail push-container-image --region ap-west-1 --service-name invent --label inventory --image invent_app:latest
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Steve Willcock |
Solution 2 | Kumar Pankaj Dubey |