Open Closed

Need support to deploy abp solution on docker/k8s #2854


User avatar
0
tech-admin@on.app created

We create docker image for our application build on top of abp commercial. The following is Dockerfile for IdentityServer (we run it as separated deployment)

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src

COPY . .
WORKDIR "/src/aspnet-core/src/On.Ops.IdentityServer"

RUN dotnet restore
RUN dotnet publish -c Release -o /app
RUN dotnet dev-certs https -v -ep /app/identityserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED

FROM build AS publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "On.Ops.IdentityServer.dll"]

But it cannot run when start instance.

We try to publish the application with

dotnet publish dotnet publish -c Release

1 Answer(s)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    If you want to build your image locally, see my answer for dockerfile.

    dotnet dev-certs https -v -ep /app/identityserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED

    This doesn't work for production, it only generates certificate for localhost.

    If you are publishing to Azure, you can use free azure HTTPS certificates. Or you can generate a self-signed certificate for your application. You can check how to generate self-signed certificate using openssl.

    If you are publishing IdentityServer, you can check IdentityServer Deployment docs.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 18, 2025, 10:42