diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 41cf93a..37ff91d 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -38,11 +38,14 @@ jobs: ECR_REPOSITORY: ${{ vars.ECR_REPOSITORY }} IMAGE_TAG: ${{ github.sha }} run: | - # Build a docker container and - # push it to ECR so that it can - # be deployed to ECS. + # Build the base image + cd api + docker build . -f cloud/BaseImage.Dockerfile -t baseImage - pwd && ls - cd api && docker build . -f cloud/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest + # Build a docker container from the base image + # and push it to ECR so that it can + # be deployed by AppRunner + + docker build . -f cloud/Final.Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest docker push $ECR_REGISTRY/$ECR_REPOSITORY --all-tags echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT diff --git a/api/cloud/Final.Dockerfile b/api/cloud/Final.Dockerfile index bdd4f55..592c3ad 100644 --- a/api/cloud/Final.Dockerfile +++ b/api/cloud/Final.Dockerfile @@ -1,6 +1,6 @@ ARG WORKDIR="/app" -FROM halzinnia/drive-gooder-base:v0.0.2 +FROM baseImage ARG WORKDIR WORKDIR ${WORKDIR}