forked from PCJones/MediathekArr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (24 loc) · 826 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
WORKDIR /app
# Copy and restore dependencies
COPY . ./
RUN dotnet restore
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:9.0
RUN apt-get update && apt-get install -y tar xz-utils && rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Set up environment variables for user IDs
#ARG PUID=1000
#ARG PGID=1000
#ENV PUID=${PUID} \
#PGID=${PGID}
# Create a user and group with specified IDs
#RUN addgroup --gid ${PGID} appgroup && \
# adduser --disabled-password --gecos "" --uid ${PUID} --gid ${PGID} appuser
# Copy the built app from the build environment
COPY --from=build-env /app/out .
# Change ownership to non-root user
#RUN chown -R appuser:appgroup /app
#USER appuser
ENTRYPOINT ["dotnet", "MediathekArrServer.dll"]