-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (33 loc) · 1.5 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (33 loc) · 1.5 KB
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
33
34
35
36
37
38
39
# ── Build stage: Svelte management UI ─────────────────────────
FROM node:24-alpine AS ui-build
WORKDIR /ui
COPY src/BossCam.ManagementUI/package*.json ./
RUN npm ci || npm install
COPY src/BossCam.ManagementUI/ ./
RUN npm run build
# ── Build stage: .NET service ─────────────────────────────────
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dotnet-build
WORKDIR /src
COPY BossCamSuite.Linux.sln Directory.Build.props ./
COPY src/ ./src/
COPY tests/ ./tests/
COPY --from=ui-build /BossCam.Service/wwwroot ./src/BossCam.Service/wwwroot
RUN dotnet restore BossCamSuite.Linux.sln
RUN dotnet build BossCamSuite.Linux.sln -c Release --no-restore
RUN dotnet publish src/BossCam.Service/BossCam.Service.csproj -c Release --no-restore -o /app
# ── Runtime stage ─────────────────────────────────────────────
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=dotnet-build /app /app
EXPOSE 5317
ENV ASPNETCORE_URLS=http://+:5317
ENV BOSSCAM_BIND=0.0.0.0
ENV BOSSCAM_PORT=5317
# Must be set for non-loopback binds. Generate with: openssl rand -hex 32
# ENV BOSSCAM_LAN_TOKEN=
VOLUME ["/root/.local/share/BossCamSuite"]
ENTRYPOINT ["dotnet", "/app/BossCam.Service.dll"]