I have tried following the documentation on this link :
<https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.container.console.html#docker-images-private>
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.container.console.html#docker-alami
My .dockercfg file looks something like this:
{
"https://index.docker.io/v1/" :
{
"auth" : "username:pwd [base 64 enc]",
"email" : "email_id"
}
}
I'm trying to pull a private image from Docker hub and my Dockerrun.aws.json looks something like this :
{
"AWSEBDockerrunVersion": "1",
"Authentication": {
"Bucket": "my-bucket",
"Key": ".dockercfg"
},
"Image": {
"Name": "dishvy/imgname:tag",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "80"
}
],
"Volumes": [
{
"HostDirectory": "/var/app/mydb",
"ContainerDirectory": "/etc/mysql"
}
],
"Logging": "/var/log/nginx"
}
I have added the dockercfg file at the root of the bucket. And when i'm trying to deploy this to AWS Beanstalk, I get this error :
Error response from daemon: pull access denied for dishvy/imgname:tag, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
This essentially means my authentication file on S3 isn't correct but i followed the steps given in documentation and can't figure out where i went wrong. Can anybody help me out here?