-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 1011 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 1011 Bytes
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
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /build
RUN git clone --depth=1 https://github.com/Ekwav/websocket-sharp \
&& git clone --depth=1 https://github.com/Coflnet/HypixelSkyblock.git dev \
&& git clone --depth=1 https://github.com/Coflnet/SkyFilter.git \
&& git clone --depth=1 https://github.com/Coflnet/SkyBackendForFrontend.git
WORKDIR /build/sky
COPY SkyModCommands.csproj SkyModCommands.csproj
RUN dotnet restore
COPY . .
RUN rm SkyModCommands.sln && dotnet test
RUN dotnet publish -c release -o /app
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
# Install required system libraries for image rendering
RUN apt-get update && apt-get install -y \
libfontconfig1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /app .
ENV ASPNETCORE_URLS=http://+:8000
RUN useradd --uid $(shuf -i 2000-65000 -n 1) app-user
USER app-user
RUN export PATH="$PATH:$HOME/.dotnet/tools"
ENTRYPOINT ["dotnet", "SkyModCommands.dll", "--hostBuilder:reloadConfigOnChange=false"]