diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6a79b42 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build +WORKDIR /build + +ENV DEBIAN_FRONTEND=noninteractive + +COPY . . + +# Build project... + + +ARG ASPNET_IMAGE_TAG +FROM mcr.microsoft.com/dotnet/aspnet:6.0.9-bullseye-slim AS final + +COPY --from=build /app /app + +WORKDIR /app +COPY ./script/web-docker-entrypoint.sh ./docker-entrypoint.sh +RUN chmod +x ./docker-entrypoint.sh +EXPOSE 80/tcp diff --git a/script/web-docker-entrypoint.sh b/script/web-docker-entrypoint.sh new file mode 100755 index 0000000..57792da --- /dev/null +++ b/script/web-docker-entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# exit on failures +set -e +set -o pipefail + +exec "$@"