-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.alpine
More file actions
23 lines (21 loc) · 841 Bytes
/
Dockerfile.alpine
File metadata and controls
23 lines (21 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Copyright (C) 2024 Dirk Stolle
#
# SPDX-License-Identifier: GPL-3.0-or-later
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY . .
RUN dotnet restore ./Mocktrix/Mocktrix.sln
RUN dotnet build ./Mocktrix/Mocktrix.csproj -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet publish ./Mocktrix/Mocktrix.csproj -c $BUILD_CONFIGURATION -o /app/publish --self-contained true --runtime linux-musl-x64
FROM alpine:latest AS final
LABEL org.opencontainers.image.authors="Dirk Stolle <striezel-dev@web.de>"
LABEL org.opencontainers.image.source=https://gitlab.com/striezel/mocktrix
LABEL org.opencontainers.image.licenses=GPL-3.0-or-later
RUN adduser app -D
RUN apk update && apk upgrade && apk add libstdc++ icu-libs
USER app
WORKDIR /app
COPY --from=builder /app/publish .
EXPOSE 5000
CMD ./Mocktrix