diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 896b697..6b64b98 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/build/dockerfile b/build/dockerfile new file mode 100644 index 0000000..4e20d60 --- /dev/null +++ b/build/dockerfile @@ -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" ] \ No newline at end of file