I tried to deploy using ECR on AWS but it took a long time to build and push. The cause of this was that the file was too large.
du -sh ./*/
You can check the file size for each directory with this command. It's lighter now, but initially there were about 7G public directors.
It was caused by the packs folder in the public folder, which is where the assets generated by Webpacker are stored.
Old files are no longer needed, so it's a good idea to delete the unwanted files in the public/packs folder once before deploying.