- 最新
- 最多得票
- 最多評論
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
相關內容
- 已提問 6 個月前
- 已提問 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 9 個月前
Hi,
Please view my comment for the fix Thank you