aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..da6a91c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,25 @@
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
+ARG TARGETARCH
+WORKDIR /source
+
+COPY RhSolutions.SkuParser.Api/*.csproj .
+RUN dotnet restore -a $TARGETARCH
+
+COPY RhSolutions.SkuParser.Api/. .
+RUN dotnet publish -a $TARGETARCH --no-restore -o /app
+
+FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
+EXPOSE 8080
+
+ENV \
+ DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
+ LC_ALL=ru_RU.UTF-8 \
+ LANG=ru_RU.UTF-8
+RUN apk add --no-cache \
+ icu-data-full \
+ icu-libs
+
+WORKDIR /app
+COPY --from=build /app .
+USER $APP_UID
+ENTRYPOINT ["./RhSolutions.SkuParser.Api"] \ No newline at end of file