build scripts
This commit is contained in:
parent
a97362a3e7
commit
9cec78afc3
5 changed files with 72 additions and 3 deletions
37
Dockerfile.app
Normal file
37
Dockerfile.app
Normal file
|
@ -0,0 +1,37 @@
|
|||
#FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
FROM privateregistry.michelescandura.com/michele/basecompileimage as build
|
||||
WORKDIR /src
|
||||
|
||||
# copy csproj and restore as distinct layers
|
||||
#COPY Sledgemapper.Api/*.csproj ./Sledgemapper.Api/
|
||||
COPY Sledgemapper.Shared/*.csproj ./Sledgemapper.Shared/
|
||||
COPY Sledgemapper/*.csproj ./Sledgemapper/
|
||||
|
||||
|
||||
#WORKDIR /src/Sledgemapper.Api
|
||||
#RUN dotnet restore
|
||||
|
||||
WORKDIR /src/Sledgemapper.Shared
|
||||
RUN dotnet restore
|
||||
|
||||
WORKDIR /src/Sledgemapper
|
||||
RUN dotnet restore
|
||||
|
||||
# copy everything else and build app
|
||||
WORKDIR /src
|
||||
#COPY Sledgemapper.Api/. ./Sledgemapper.Api/
|
||||
COPY Sledgemapper.Shared/. ./Sledgemapper.Shared/
|
||||
COPY Sledgemapper/. ./Sledgemapper/
|
||||
WORKDIR /src/Sledgemapper
|
||||
|
||||
COPY build.sh .
|
||||
RUN chmod +x build.sh
|
||||
RUN sh build.sh
|
||||
#WORKDIR /src/Sledgemapper.Api
|
||||
#RUN dotnet publish -c release -o /app --no-restore
|
||||
|
||||
# final stage/image
|
||||
#FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||
#WORKDIR /app
|
||||
#COPY --from=build /app ./
|
||||
#ENTRYPOINT ["dotnet", "Sledgemapper.Api.dll"]
|
Loading…
Add table
Add a link
Reference in a new issue