-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
28 lines (20 loc) · 897 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
ARG DOTNET_6=6.0.410
# Use .NET 6 SDK as the primary environment
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_6} AS base-env
# Set the working directory
WORKDIR /app
# Install .NET 7 Runtime and .NET 8 SDK alongside .NET 6 SDK
COPY --from=mcr.microsoft.com/dotnet/sdk:7.0 /usr/share/dotnet/shared /usr/share/dotnet/shared
COPY --from=mcr.microsoft.com/dotnet/sdk:8.0 /usr/share/dotnet /usr/share/dotnet
# Copy the project files
COPY out/ /app/
# Set environment variables for the service
ENV ASPNETCORE_URLS=http://0.0.0.0:7020
# Install the AElf.ContractTemplates globally
RUN dotnet new --install AElf.ContractTemplates
# Create global.json to force the use of .NET 6 SDK
RUN dotnet new globaljson --sdk-version $$DOTNET_6 --force
# Expose port 7020
EXPOSE 7020
# Minimal change to run freshclam before starting the service
ENTRYPOINT ["/usr/share/dotnet/dotnet", "PlaygroundService.dll"]