Browse Source

Created docker file for azure devops

pull/20279/head
selmankoc 2 years ago
parent
commit
8ed508c636
  1. 19
      modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile
  2. 22
      modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure
  3. 2
      modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/azure-pipelines.yml

19
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile

@ -1,21 +1,6 @@
FROM node:16 AS nodebase
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
COPY --from=nodebase /usr/local/bin /usr/local/bin
COPY --from=nodebase /usr/local/lib /usr/local/lib
WORKDIR /app
COPY . .
RUN dotnet tool update --global Volo.Abp.Cli
ENV PATH="${PATH}:/root/.dotnet/tools/"
RUN abp install-libs
RUN dotnet publish -c Release -o bin/Release/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80
COPY --from=build /app/bin/Release/publish .
COPY bin/Release/publish .
ENTRYPOINT ["dotnet", "Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.dll"]

22
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure

@ -0,0 +1,22 @@
FROM node:16 AS nodebase
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
COPY --from=nodebase /usr/local/bin /usr/local/bin
COPY --from=nodebase /usr/local/lib /usr/local/lib
WORKDIR /app
COPY . .
RUN dotnet tool update --global Volo.Abp.Cli
ENV PATH="${PATH}:/root/.dotnet/tools/"
WORKDIR /app/abp/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
RUN abp install-libs
RUN dotnet publish -c Release -o bin/Release/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80
COPY --from=build /app/bin/Release/publish .
ENTRYPOINT ["dotnet", "Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.dll"]

2
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/azure-pipelines.yml

@ -45,7 +45,7 @@ stages:
command: build
repository: demo/bootstrap-taghelpers
dockerfile: $(bootstrapTaghelpersDir)/Dockerfile
buildContext: $(bootstrapTaghelpersDir)
buildContext: $(workDir)
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)

Loading…
Cancel
Save