From 8ed508c636c6e9673639886953fc756991c42bf5 Mon Sep 17 00:00:00 2001 From: selmankoc Date: Wed, 24 Jul 2024 14:54:15 +0300 Subject: [PATCH] Created docker file for azure devops --- .../Dockerfile | 19 ++-------------- .../Dockerfile.azure | 22 +++++++++++++++++++ .../azure-pipelines.yml | 2 +- 3 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile index 29dbeae5b8..4e9b0e733a 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile +++ b/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"] diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile.azure new file mode 100644 index 0000000000..f4fccda692 --- /dev/null +++ b/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"] diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/azure-pipelines.yml b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/azure-pipelines.yml index 572f42708e..2b60edff8d 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/azure-pipelines.yml +++ b/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)