Skip to content

Commit

Permalink
can I use a local base image?
Browse files Browse the repository at this point in the history
  • Loading branch information
seplee committed Mar 30, 2024
1 parent 9514fd9 commit 2174324
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion api/cloud/Final.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG WORKDIR="/app"

FROM halzinnia/drive-gooder-base:v0.0.2
FROM baseImage

ARG WORKDIR
WORKDIR ${WORKDIR}
Expand Down

0 comments on commit 2174324

Please sign in to comment.