You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
821 B
20 lines
821 B
1 year ago
|
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
|
||
|
COPY . .
|
||
|
|
||
|
WORKDIR /templates/service/host/IdentityServerHost
|
||
|
RUN dotnet restore
|
||
|
RUN dotnet ef migrations script -i -o migrations-IdentityServerHost.sql
|
||
|
|
||
|
WORKDIR /templates/service/host/SettleAccount.Host
|
||
|
RUN dotnet restore
|
||
|
RUN dotnet ef migrations script -i -o migrations-SettleAccount.sql
|
||
|
|
||
|
FROM mcr.microsoft.com/mssql-tools AS final
|
||
|
WORKDIR /src
|
||
|
COPY --from=build /templates/service/host/IdentityServerHost/migrations-IdentityServerHost.sql migrations-IdentityServerHost.sql
|
||
|
COPY --from=build /templates/service/host/SettleAccount.Host/migrations-SettleAccount.sql migrations-SettleAccount.sql
|
||
|
COPY --from=build /templates/service/database/entrypoint.sh .
|
||
|
RUN /bin/bash -c "sed -i $'s/\r$//' entrypoint.sh"
|
||
|
RUN chmod +x ./entrypoint.sh
|
||
|
|
||
|
ENTRYPOINT ["./entrypoint.sh"]
|