-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (58 loc) · 3.04 KB
/
Copy pathDockerfile
File metadata and controls
69 lines (58 loc) · 3.04 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Build context: repo root
#
# Build:
# docker build -t openbi-mcp-server .
#
# Or with docker compose (if docker-compose.yml is present):
# docker compose up
# ---------------------------------------------------------------------------- #
# Build stage #
# ---------------------------------------------------------------------------- #
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /repo
# Central Package Management
COPY Directory.Packages.props .
# Project files for layer-cached restore
COPY OpenBI/OpenBI.csproj \
OpenBI/
COPY OpenBI.Interfaces/OpenBI.Interfaces.csproj \
OpenBI.Interfaces/
COPY OpenBI.Common/OpenBI.Common.csproj \
OpenBI.Common/
COPY OpenBI.Connectors/OpenBI.Connectors.Interfaces/OpenBI.Connectors.Interfaces.csproj \
OpenBI.Connectors/OpenBI.Connectors.Interfaces/
COPY OpenBI.Connectors/OpenBI.Connectors.MicrosoftPowerBI/OpenBI.Connectors.PowerBI.csproj \
OpenBI.Connectors/OpenBI.Connectors.MicrosoftPowerBI/
COPY OpenBI.Converters/OpenBI.Converters.Interfaces/OpenBI.Converters.Interfaces.csproj \
OpenBI.Converters/OpenBI.Converters.Interfaces/
COPY OpenBI.Converters/OpenBI.Converters.PowerBI/OpenBI.Converters.PowerBI.csproj \
OpenBI.Converters/OpenBI.Converters.PowerBI/
COPY OpenBI.MCP.Server/OpenBI.MCP.Server.csproj \
OpenBI.MCP.Server/
RUN dotnet restore OpenBI.MCP.Server/OpenBI.MCP.Server.csproj
# Copy source
COPY OpenBI/ OpenBI/
COPY OpenBI.Interfaces/ OpenBI.Interfaces/
COPY OpenBI.Common/ OpenBI.Common/
COPY OpenBI.Connectors/OpenBI.Connectors.Interfaces/ OpenBI.Connectors/OpenBI.Connectors.Interfaces/
COPY OpenBI.Connectors/OpenBI.Connectors.MicrosoftPowerBI/ OpenBI.Connectors/OpenBI.Connectors.MicrosoftPowerBI/
COPY OpenBI.Converters/OpenBI.Converters.Interfaces/ OpenBI.Converters/OpenBI.Converters.Interfaces/
COPY OpenBI.Converters/OpenBI.Converters.PowerBI/ OpenBI.Converters/OpenBI.Converters.PowerBI/
COPY OpenBI.MCP.Server/ OpenBI.MCP.Server/
RUN dotnet publish OpenBI.MCP.Server/OpenBI.MCP.Server.csproj \
-c Release -o /app/publish --no-restore
# ---------------------------------------------------------------------------- #
# Runtime stage #
# ---------------------------------------------------------------------------- #
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
# Mount these volumes to provide external configuration at runtime:
# sites/ <- site JSON files
# plugins/ <- connector / converter plugin folders
# platforms/ <- platform info, visual types, asset type instructions
# secrets/ <- site credential files (do not bake into image)
VOLUME ["/app/sites", "/app/plugins", "/app/platforms", "/app/secrets"]
ENV ASPNETCORE_URLS=http://+:8080
EXPOSE 8080
ENTRYPOINT ["dotnet", "OpenBI.MCP.Server.dll"]