Skip to content

Commit

Permalink
updated container build
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Haken committed Dec 11, 2024
1 parent fc2a4db commit b8d48a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
cd ${{ github.workspace }}/app-src
dotnet publish --configuration Release --runtime linux-musl-arm64 --output ${{ github.workspace }}/app-src/output/src -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --self-contained
cd ${{ github.workspace }}/app-src/output
docker build --tag $PROJECT_NAME/app:latest --platform linux/arm64 --build-arg SRC=${{ github.workspace }}/app-src/output/src .
docker build --tag $PROJECT_NAME/app:latest --platform linux/arm64 --build-arg SRC=${{ github.workspace }}/app-src/output/src --file ${{ github.workspace }}/build/dockerfile .
docker save $PROJECT_NAME/app:latest | gzip > ${{ github.workspace }}/assets/container.tar.gz
rm -rf ${{ github.workspace }}/app-src/output
Expand Down
13 changes: 13 additions & 0 deletions build/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
ARG PLATFORM=linux/arm64

FROM --platform=${PLATFORM} public.ecr.aws/docker/library/alpine:latest

ARG SRC=src

ADD ${SRC} /var/www/multi-az-app
RUN apk --no-cache add curl libstdc++ libgcc

EXPOSE 5000
ENTRYPOINT [ "/var/www/multi-az-app/multi-az-application" ]

0 comments on commit b8d48a5

Please sign in to comment.