- Newest
- Most votes
- Most comments
That output looks like it's coming from your Beanstalk environment, so the good news is that your CI/CD pipeline appears to be working correctly.
It looks like you have a prebuild hook in your application bundle which is failing. Check for .platform/hooks/prebuild/01login.sh
in your repo, it appears that lines 2 and 3 of this script are trying to run an environment
command, but there is no such command on the Beanstalk instance. Is it possible that this script should instead be using the env
command (1)?
Hello,
I had the same problem when I was trying to configure docker login in my Elastic Beanstalk enviornment. I followed the document : https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/single-container-docker-configuration.html
The provided script in the document is :
01login.sh
#!/bin/bash
USER=/opt/elasticbeanstalk/bin/get-config environment -k USER
/opt/elasticbeanstalk/bin/get-config environment -k PASSWD | docker login -u $USER --password-stdin
Please update it to, 01login.sh
#!/bin/bash
USER=`/opt/elasticbeanstalk/bin/get-config environment -k USER`
/opt/elasticbeanstalk/bin/get-config environment -k PASSWD | docker login -u $USER --password-stdin
This works successfully. I have tested this out and from the eb-hooks.log
023/04/18 17:17:26.245921 [INFO] Running command .platform/hooks/prebuild/01_login.sh
2023/04/18 17:17:26.347292 [INFO] Login Succeeded
2023/04/18 17:17:26.347318 [INFO] WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
I have requested the document team to update the document. Thank you
Relevant content
- asked 3 years ago
- asked 2 years ago
- asked 19 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
Hi,
Please view my comment for the fix Thank you