forked from Ed-Fi-Alliance-OSS/Ed-Fi-DataImport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.Dockerfile
56 lines (46 loc) · 2.29 KB
/
dev.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
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
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
#tag sdk:6.0-alpine
FROM mcr.microsoft.com/dotnet/sdk@sha256:c1a73b72c02e7b837e9a93030d545bc4181193e1bab1033364ed2d00986d78ff AS build
WORKDIR /source
COPY DataImport.Web/*.csproj DataImport.Web/
COPY DataImport.Server.TransformLoad/*.csproj DataImport.Server.TransformLoad/
COPY DataImport.Models/*.csproj DataImport.Models/
COPY DataImport.Common/*.csproj DataImport.Common/
COPY DataImport.EdFi/*.csproj DataImport.EdFi/
COPY logging.json logging.json
COPY logging_PgSql.json logging_PgSql.json
COPY logging_Sql.json logging_Sql.json
RUN dotnet restore DataImport.Server.TransformLoad/DataImport.Server.TransformLoad.csproj
RUN dotnet restore DataImport.Web/DataImport.Web.csproj
COPY DataImport.Web/ DataImport.Web/
COPY DataImport.Server.TransformLoad/ DataImport.Server.TransformLoad/
COPY DataImport.Models/ DataImport.Models/
COPY DataImport.Common/ DataImport.Common/
COPY DataImport.EdFi/ DataImport.EdFi/
WORKDIR /source/DataImport.Web
RUN dotnet build -c Release --no-restore
FROM build AS publish
RUN dotnet publish -c Release --no-build -o /app/DataImport.Web
WORKDIR /source/DataImport.Server.TransformLoad
RUN dotnet build -c Release --no-restore
RUN dotnet publish -c Release --no-build -o /app/DataImport.Server.TransformLoad
#tag aspnet:6.0-alpine
FROM mcr.microsoft.com/dotnet/aspnet@sha256:5d7911e8485a58ac50eefa09e2cea8f3d59268fd7f1501f72324e37e29d9d6ee
LABEL maintainer="Ed-Fi Alliance, LLC and Contributors <techsupport@ed-fi.org>"
# Alpine image does not contain Globalization Cultures library so we need to install ICU library to get for LINQ expression to work
# Disable the globaliztion invariant mode (set in base image)
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
ENV ASPNETCORE_ENVIRONMENT Development
WORKDIR /app
ENV TZ=US/Central
RUN apk add --no-cache icu=~67.1 tzdata
WORKDIR /app/DataImport.Web
COPY --from=publish /app/DataImport.Web .
WORKDIR /app/DataImport.Server.TransformLoad
COPY --from=publish /app/DataImport.Server.TransformLoad .
EXPOSE 80
WORKDIR /app/DataImport.Web
ENTRYPOINT ["dotnet", "DataImport.Web.dll"]