forked from sillsdev/machine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
22 lines (18 loc) · 782 Bytes
/
dockerfile
File metadata and controls
22 lines (18 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy AS build-env
WORKDIR /app
RUN apt-get update && apt-get install -y g++ curl cmake
# Copy everything
COPY . .
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish ./src/SIL.Machine.Serval.EngineServer/SIL.Machine.Serval.EngineServer.csproj -c Release -o out_engine_server
RUN dotnet publish ./src/SIL.Machine.Serval.JobServer/SIL.Machine.Serval.JobServer.csproj -c Release -o out_job_server
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy as production
# libgomp needed for thot
RUN apt-get update && apt-get install -y libgomp1
WORKDIR /app
COPY --from=build-env /app/out_engine_server ./engine_server
COPY --from=build-env /app/out_job_server ./job_server
CMD ["bash"]