- ABP Framework version: v5.3.0
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:" I am trying to run the application in debug mode with Linux Docker Container, getting this License check error. I tried with the solution given in https://support.abp.io/QA/Questions/69/ but no luck. Below is my docker file
`#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app
ENV ASPNETCORE_ENVIRONMENT Production
EXPOSE 80 EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["NuGet.Config", "."] COPY ["AkadimiWF/AkadimiWF.csproj", "AkadimiWF/"]
RUN dotnet tool install --global Volo.Abp.Cli ENV PATH /root/.dotnet/tools:$PATH RUN echo $PATH RUN abp login ******** -p ********
RUN dotnet restore "AkadimiWF/AkadimiWF.csproj" COPY . . WORKDIR "/src/AkadimiWF" RUN dotnet build "AkadimiWF.csproj" -c Release -o /app/build
FROM build AS publish RUN dotnet publish "AkadimiWF.csproj" -c Release -o /app/publish
FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "AkadimiWF.dll"]`
4 Answer(s)
-
0
In the
Production
environment of ABP templates, the default log level isInformation
, so the logs at theDebug
level are not visible, but there is a log at theDebug
level in the log you sent. As a result, it seems to me that somehow your application is running inDevelopment
mode. But just to be sure, can you tell me your log level inProduction
mode?Also, after you
logout
withabp cli
in your local, do you have a chance to publish and run the application with Production mode? Thus, we understand that the problem is not related to base images or not. -
0
-
0
First, no need to run
RUN abp login ******** -p ********
Copy your local ABP token file which is at
%UserProfile%\.abp\cli\access-token.bin
into your Docker container's target directory:- Windows =>
%UserProfile%\.abp\cli\
- Linux =>
/home/user/.abp/cli/
- Windows =>
-
0
The issue has been solved, Minor correction on your answer, when you debug the application with Linux docker container and Visual Studio, path for
$HOME
is/root
not/home/user
. I copiedaccess-token.bin
file from%UserProfile%\.abp\cli\
to folderD:\\POCs\\token
and mapped volume in launchSettings.json Docker section DockerfileRunArguments-v D:\\POCs\\token:/root/.abp/cli
."Docker": { "commandName": "Docker", "launchBrowser": true, "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "DockerfileRunArguments": "-v D:\\POCs\\token:/root/.abp/cli", "publishAllPorts": true, "useSSL": true }