TechToSpeech / terraform-aws-serverless-static-wordpress

Terraform module for deploying Serverless Static Wordpress on AWS
GNU General Public License v3.0
196 stars 69 forks source link

Docker build is not executed #73

Closed Droshow closed 2 years ago

Droshow commented 2 years ago

So, I have an terraform infra built, image:base in ECR simple wordpress and now I want to CodeBuild

I have wordpress-docker.zip in S3 referenced in CodeBuild also. Run Build

and

[Container] 2022/06/01 14:06:59 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG --build-arg aws_account_id=$AWS_ACCOUNT_ID --build-arg aws_region=$AWS_DEFAULT_REGION --build-arg ecr_repo_name=$IMAGE_REPO_NAME -f Dockerfile_serverless_wordpress .

Can't see any logs too, so I am lost in where to come up with next. I don't see a thread around Docker, hope I am not the first one with CodeBuild problems 😨

If you can please help. Dro

petewilcock commented 2 years ago

Hey @Droshow - could you provide additional logs? A few lines above and below the error, usually gives a bit more of a hint as to where the problem is.

Droshow commented 2 years ago
Screenshot 2022-06-01 at 17 30 07
Droshow commented 2 years ago

Thank you @petewilcock for your reply, much appreciated. This is after the pull is completed of the base wordpress image. Then fails :OO

petewilcock commented 2 years ago

ok I see the problem. You've passed the architecture flag to the ecr-mirror module, which if you copy/pasted the example will pull/push an ARM64 image to ECR. Codebuild is then trying to use that image on amd64 and it doesn't work.

You'll need to remove the architecture argument to pull/push the default, and it should work.

Droshow commented 2 years ago

Yes, it was that :) @petewilcock

Wow, thanks a lot man! You are doing a lot for us and boy, you seem to be a great Devops engineer! Can I like buy you a coffee somewhere or at least praise you to heavens :))) ?

petewilcock commented 2 years ago

haha not necessary @Droshow , just glad it's working for you :)