From 2f1234654baaf02cd7531d8b74c6f04ce0135a41 Mon Sep 17 00:00:00 2001 From: Ash Davies <3853061+DrizzlyOwl@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:03:45 +0000 Subject: [PATCH] Skeleton Docker setup --- Dockerfile | 19 +++++++++++++++++++ script/web-docker-entrypoint.sh | 7 +++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile create mode 100755 script/web-docker-entrypoint.sh 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 "$@"