This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/support/simulator/Dockerfile
2022-11-03 16:41:13 -04:00

28 lines
878 B
Docker

#Pull Base Image
FROM mcr.microsoft.com/dotnet/runtime:3.1-alpine AS base
WORKDIR /app
#Pull SDK Image to Build Solution
FROM mcr.microsoft.com/dotnet/sdk:3.1-alpine AS build
WORKDIR /src
COPY . .
RUN dotnet restore -nowarn:msb3202,nu1503
WORKDIR /src/DeviceSim
RUN dotnet build -c Release -o /app
#Build .net solution
FROM build AS publish
RUN dotnet publish -c Release -o /app
FROM base AS final
WORKDIR /app
ENV SQL_USER="devopsohsa00" \
SQL_PASSWORD="devopsohdevpwd-00" \
SQL_SERVER="changeme.database.windows.net" \
SQL_DBNAME="mydrivingDB" \
TRIP_FREQUENCY="180000" \
TEAM_NAME="devopsoh000test" \
USER_ROOT_URL="https://openhack${RGSUFFIX}userprofile.azurewebsites.net"\
POI_ROOT_URL="https://openhack${RGSUFFIX}poi.azurewebsites.net"\
TRIPS_ROOT_URL="https://openhack${RGSUFFIX}trips.azurewebsites.net"
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "DeviceSim.dll"]