If your build keeps failing on Docker Cloud Automated Build but it builds successfully on your local machine, you most like are using a node with insufficient memory to build your image.
The automated build feature on Cloud behaves differently from Docker Hub. On Cloud, builds are performed on one of your nodes on Docker Cloud, whereas builds triggered on Docker Hub are built on dedicated build clusters for Docker Hub.
This is an example error message during the building process:
g++: internal compiler error: Killed (program cc1plus)
To solve this issue, add a new node with larger specs (at least 4GB of memory) and tag it with the builderdeploy tag, so that all automated builds trigger on Cloud are built using that node:
- Launch a new node cluster
- Add the tag builderunder Deploy tags
- Make sure to select a node type with at least 4GB of RAM
- Launch node cluster
- Rebuild your image
- Read more about Automated Builds on Cloud: https://docs.docker.com/docker-cloud/feature-reference/automated-build/
- See also Automated builds work on Hub but not in Cloud