Search code examples
aws-code-deploydockerhubaws-codepipelineaws-codebuild

How do you reference dockerhub as a source for your application image within the codedeploy appspec?


I already implemented dockerhub to source the baseline image in the buildspec to package the application, then tag/push back to DockerHub:

- docker tag XXXX/docker_demo:demo XXXX/docker_demo:demo
- docker push XXXX/docker_demo:demo

This works... However, when running a CodeDeploy Application (tied via a CodePipeline) it complains: enter image description here

Please note that I have already viewed: https://forums.aws.amazon.com/thread.jspa?messageID=785905 And CodeDeploy Error: "The revision size is too large. Its maximum size is 51200B." Neither really answer the original question posted (over a year ago; so hoping there have been some developments since).

If I didn't know better, I would guess that I might be forced to use ECR?

Thanks in advance.


Solution

  • This error indicated CodeDeploy is expecting an appspec file (hence the small filesize) and you have provided a zip artifact file.

    We need more information on the Deployment action in CodePipeline. Are you using Amazon ECS or Amazon ECS (Blue/Green) deploy action? Remember you will not use "CodeDeploy" action in CodePipeline to deploy to ECS. That action is for EC2 deployments with CodeDeploy.