appSettings.json for .NET Core app in Docker? - c#

I am running a .net core app in a docker container. Here is my docker file (just to build a dev environment):
FROM microsoft/dotnet:1.0.1-sdk-projectjson
ENV ASPNET_ENV Development
COPY bin/Debug/netcoreapp1.0/publish/ /root/
EXPOSE 5000/tcp
ENTRYPOINT dotnet /root/AVP.WebApi.dll
I have an appSettings.Development.json file in the /publish/ folder. If I build and run this Docker file, I end up with a strange issue where the .NET app can't find the appsettings it needs to start (they're in the appSettings.Development.json file).
I have confirmed that from the command line in windows if I run dotnet publish/AVP.WebAPI.dll the app throws the same exceptions for missing configuration settings. However if I cd to /publish and run dotnet AVP.WebAPI.dll the app starts and runs just fine.
Any ideas how to change my docker file so it will run the app properly with the appSettings.Development.json values? (I've also tried to run the app with all the values copied into the regular appSettings.json files with no luck)
I've also tried running a the COPY command to / instead of /root and doing dotnet AVP.WebApi.dll as the entry point, but that results in the project being unable to find dependencies.

Try replacing this line:
ENV ASPNET_ENV Development
With this:
ENV ASPNETCORE_ENVIRONMENT Development
Your original Environment Variable name was used in older .NET Core, but has been changed. It can be a pain finding tutorials, etc. for .NET Core because of all of the changes that have happened since it first started!
Don't get me started on project.json files!
More info:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/environments

As a follow up to everyone (I posted this is a comment originally), this is what ended up fixing it:
From what I can tell it looks like dotnet expects the appsettings files to be in the same directory it is run from. So I added COPY bin/Debug/netcoreapp1.0/publish/appsettings.json /appsettings.json to the dockerfile (this line copies the appsettings file to the directory below /root/ where I copied the publish folder to). Everything started working at this point. It appears that the dotnet executable runs from the directory below /root/ so it couldn't find it before, now that appsettings is in the same folder, it's all happy.

It late, but i think my solution will help other.
Step 1. Put appseting in folder "Settings/appsettings.json".
Here is my appsettings.json
{
"ConnectionString": "Data Source=local;Initial Catalog=mydb;User Id=username;Password=myStr0ngPassword#;"
}
Step 2. Edit code from asp netcore.
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
namespace Repos.Configs
{
public static class ConfigurationManager
{
public static string currentPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
public static IConfiguration AppSetting { get; }
static ConfigurationManager()
{
AppSetting = new ConfigurationBuilder()
.SetBasePath(currentPath)
.AddJsonFile("Settings/appsettings.json") // your path here
.Build();
}
}
}
And use AppSetting.
var connectionString = ConfigurationManager.AppSetting["ConnectionString"];
Step 3. now u must config your dockerfile, in my case, create by visual studio in linux container.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
WORKDIR /src
COPY ["Api/Api.csproj", "Api/"]
COPY ["Repos/Repos.csproj", "Repos/"]
COPY ["DataContext/DataContext.csproj", "DataContext/"]
RUN dotnet restore "Api/Api.csproj"
COPY . .
WORKDIR "/src/Api"
RUN dotnet build "Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Api.dll"]
Step 4. Build image.
docker build -t tagForProject .
Step 5. Map volume and run your container from image.
docker run -p 44382:80 --volume c:\Docker\Volumes\MyProjectNetCore:/app/Settings --name nameWillDisplayInDockerDashboard -d tagForProject
OK, one problem here, because docker will override c:\Docker\Volumes\MyProjectNetCore to /app/Settings. So, you must put appseting.json to c:\Docker\Volumes\MyProjectNetCore.
If not, your app cant read appsetting because it not exist in docker volume.
Step 6. Restart your app in docker dashboard and see it work.

There are three problems i can think of why it can't find the appsettings:
They are not in the right folder in the container (did you copy the publish folder and does the publish folder contain the appsetting
You did not define using appsettings for the environment in the StartupClass: appSettings.${Environment}.json
It works locally because windows filesystem is case-insensitive and linux is case sensitive and thus it can't find the file. (check your capitalization).

I use docker-compose with .net 5, I put this on my yaml :
container_name: heroapi
environment:
- ASPNETCORE_ENVIRONMENT=alpha
for use appsettings.alpha.json file and it's work

Just came across this issue myself and the problem was the file is not being copied by default.
This was fixed by editing the .csproj file and adding :
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
This can also be done through UI by right clicking the appsettings file within visual studio, selecting properties and setting sopy to directory to "Always".

My problem was, through all this docker container stuff.. I never built the project in Release Mode, so the appsettings.json file in /bin/release/publish was very old.

I just hit this issue myself, and Sam's answer did solve it. Just to propose a different solution, you can also set the WORKDIR /root directive in the Dockerfile and then use ENTRYPOINT dotnet AVP.WebApi.dll which will call dotnet in the context of the root directory.
Full Dockerfile:
FROM microsoft/dotnet:1.0.1-sdk-projectjson
ENV ASPNET_ENV Development
COPY bin/Debug/netcoreapp1.0/publish/ /root/
WORKDIR /root
EXPOSE 5000/tcp
ENTRYPOINT dotnet AVP.WebApi.dll

for compose:
environment:
- ASPNETCORE_ENVIRONMENT=Production
For Docker:
ENV ASPNETCORE_ENVIRONMENT: "Production"

there is a quick and easy way to Update/edit the AppSettings.json file:
for example my AppSettings.json file :
{
"GrpcOption": {
"ServerAddress": "oldurl"
},
}
now i can modify it by -e command
docker run -e "GrpcOption:ServerAddress=newurl" [imagename]

Related

Getting the error "program does not contain a static 'main' method suitable for an entry point" while trying to create docker on my ASP API [duplicate]

I'm running into an issue using Docker and couldn't find a proper solution.
I'm trying to build a Docker image using .NET SDK 2.1.
The thing is that when Docker tries to run the build statement, it fails and the error output is
CSC : error CS5001: Program does not contain a static 'Main' method
suitable for an entry point
The funny thing is that if I perform the build statement on command line locally, it works fine.
I have already checked my LanguageVersion tag on the project and it is 7.3.
Here is my Docker file
FROM microsoft/dotnet:2.1-sdk AS builder
WORKDIR /src
COPY ./nuget ./nuget
COPY ./NuGet.Config ./
COPY Services/AadTracking ./
# Copy all the referenced projects
COPY ./Services/AadTracking/Company/Company.Service.AadTracking/Company.Service.AadTracking.csproj ./AadTracking/Company/Company.Service.AadTracking/Company.Service.AadTracking.csproj
COPY ./Services/AadTracking/Office.Re.Service.AadTracking/Office.Re.Service.AadTracking.csproj ./AadTracking/Office.Re.Service.AadTracking/Office.Re.Service.AadTracking.csproj
COPY ./Services/AadTracking/Company/Office.Re.Service.AadTracking.Company/Office.Re.Service.AadTracking.Company.csproj ./AadTracking/Company/Office.Re.Service.AadTracking.Company/Office.Re.Service.AadTracking.Company.csproj
COPY ./Services/AadTracking/Office.Re.Service.AadTracking.EventStore/Office.Re.Service.AadTracking.EventStore.csproj ./AadTracking/Office.Re.Service.AadTracking.EventStore/Office.Re.Service.AadTracking.EventStore.csproj
# Restore packages
RUN dotnet restore "./AadTracking/Company/Company.Service.AadTracking/Company.Service.AadTracking.csproj"
RUN dotnet build -c Debug --no-restore "./AadTracking/Company/Company.Service.AadTracking/Company.Service.AadTracking.csproj"
# COPY source code
#aad tracking
COPY ./Services/AadTracking/Company/Company.Service.AadTracking ./AadTracking/Company/Company.Service.AadTracking/
COPY ./Services/AadTracking/Office.Re.Service.AadTracking ./AadTracking/Office.Re.Service.AadTracking/
COPY ./Services/AadTracking/Company/Office.Re.Service.AadTracking.Company ./AadTracking/Company/Office.Re.Service.AadTracking.Company/
COPY ./Services/AadTracking/Office.Re.Service.AadTracking.EventStore ./AadTracking/Office.Re.Service.AadTracking.EventStore/
# Publish
RUN dotnet publish "./AadTracking/Company/Company.Service.AadTracking/Company.Service.AadTracking.csproj" -c Debug -o "../../dist"
# #Build the app image
FROM microsoft/dotnet:2.1-aspnetcore-runtime
WORKDIR /app
ENV ASPNETCORE_ENVIRONMENT Switch
ENV REINSURANCE_INSTANCE Docker-dev
COPY --from=builder /dist .
ENTRYPOINT ["dotnet", "Company.Service.AadTracking.dll"]
Thanks for your help!
I know this is little bit late to answer. Still VS 2019 has the same issue with .NET Core 3.1. I took a peek at the examples provided by Microsoft. Turns out the Docker file resided in a different place in the solution and Docker copy command wasn't working properly.
You have to move your docker file one directory up, so that they are at the same level as the sln file. It will fix the issue.
OR else you can change the paths like below sample docker file WITHOUT changing the docker file location, IMHO it is better to keep the docker file with other files.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim-arm64v8 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["WhatzThat.Web.csproj", "WhatzThat.Web/"]
RUN dotnet restore "WhatzThat.Web/WhatzThat.Web.csproj" -r linux-arm64
WORKDIR "/src/WhatzThat.Web"
COPY . .
RUN dotnet build "WhatzThat.Web.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "WhatzThat.Web.csproj" -c Release -o /app/publish -r linux-arm64 --self-contained false --no-restore
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WhatzThat.Web.dll"]
I had the same issue.
I've realized that I had my Docker file at the same level of my .csproj file. I've moved my Docker file one level up in my folder structure and it's building fine.
Compiling and publishing an application inside docker will need entire application to be copied inside docker.
which means you need to copy all class files(.cs) along with required supporting files(maybe resx or config files) inside docker.
please find below reference for same
https://github.com/aspnet/aspnet-docker/issues/401
Using a multi-project solution structure, I fixed by adding "src" again into the directory to build.
Something like this:
COPY ["src/Todo.Core/Todo.Core.csproj", "Todo.Core/"]
RUN dotnet restore "Todo.Api/Todo.Api.csproj"
COPY . .
WORKDIR "/src/Todo.Api/"
RUN dotnet build "Todo.Api.csproj" -c Release -o /app/build
Turned into this:
COPY ["src/Todo.Core/Todo.Core.csproj", "Todo.Core/"]
RUN dotnet restore "Todo.Api/Todo.Api.csproj"
COPY . .
WORKDIR "/src/src/Todo.Api/"
RUN dotnet build "Todo.Api.csproj" -c Release -o /app/build
2023 Update
Unfortunately, there is an inconsistency in what Microsoft includes in Dockerfile and in which directory you run it.
There are three solutions to get this work.
First Solution
Put your auto-generated Dockerfile one level up, alongside the .sln file.
From the root directory of the solution, run the below command
docker build -t imagename .
Second Solution
Leave the Dockerfile as it is, inside your project folder.
From the root directory of the solution, run the below command
docker build -t imagename -f .\SampleProject\Dockerfile .
Third Solution
Make small changes to the Dockerfile. Now you have to run docker commands not from the root directory of the solution, but from your project folder. (one level down from .sln file).
Change from below
to
Supplementary
My DockerFile is at root level not upper and I changed the DockerFile to:
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["projectName.csproj", "projectName/"]
RUN dotnet restore "projectName/projectName.csproj"
WORKDIR "/src/projectName"
COPY . .
RUN dotnet build "projectName.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "projectName.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "projectName.dll"]
For me the COPY.. was after the workdir before the dotnet build command. I just put it after the workdir command. Then it was working.
WORKDIR "/src/WeatherAPI"
COPY . .
RUN dotnet build "WeatherAPI.csproj" -c Release -o /app/build
I have a faux pas reason.
My docker file.......I was correctly copying the directory structure and the .sln and .csproj files...........
But I had a syntax error copying the SOURCE files. (.cs files, etc, etc)
#doh!
If you look at the question above, basically I had a syntax-error/bug in the steps right below where the OP has this:
# COPY source code
More importantly, how did I figure this out ??? Here ya go:
docker images
and you do not want to drill into the last one (which is your failing image), but the NEXT TO LAST image. (remembering that docker keeps making new images for the steps of the docker file)
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mything1/mything2 latest aaaaaaaaaaaa 27 minutes ago 271MB
<none> <none> bbbbbbbbbbbb 27 minutes ago 1.18GB
and then drill into (the next to last one)
docker run --rm -it bbbbbbbbbbbb sh
when you get in there, start using "ls" and "cd" commands.
I found out I didn't have my .cs source files in the right place. A few fixes addressing relative-path issues (in my specific case) later......I had my source files in the right place(s). #yay
This is a great in-general tip for when trying to debug a failing non running image.
Answer by marvelTracker worked for me but busted using the built in Docker tools in Visual Studio 2022.
Using the command docker build -f Dockerfile .. while in the project folder builds the dockerfile from the perspective of the parent folder.
Microsoft Doc that explains building Docker in VS2022: https://learn.microsoft.com/en-us/visualstudio/containers/container-build?view=vs-2022
NOTE: I found this troubleshooting the same error for a .NET 6 Docker project.
Hopefully this helps someone else.
This error means that the file containing the Main method is NOT included so you either forgot to copy it over to the proper directory or docker is point to the incorrect directory.
From the folder having Dockerfile at present,
execute
mv Dockerfile ../
then invoke
docker build
I got same issue and manage to identify the root cause.
The issue occurred because I run the application on my windows machine before I build the docker Linux image.
Because I run it on my local windows it generate obj folder on the source code, the obj folder got copied to Docker container which contain windows specific assembly version IMHO.
To fix the issue I simply delete the obj folder from my project and rebuild the Docker.
Lesson learned, do build your Docker images on a freshly cloned repository.

How to compile and run a csharp file using dockerfile

How can I compile a single file (or several) for a simple csharp application using a docker file? My goal is to create a small csharp repl similar to the w3 schools one here. I've taken a look at this question but it does not suit my needs. I do not have a .csproj file, I am starting with a simple main.cs file like this:
using System;
using System.Collections.Generic;
using System.Linq;
class MainClass {
static void Main() {
Console.WriteLine("Hello World!");
}
}
I would like to know I can take the above code as a string and use a dockerfile to compile and run it to get the output. Specifically, what base image can I use and do I need to install any other packages before I can do this? The dockerfile below is taken from the other stack overflow question which seems reasonable but I don't want to compile an asp.net program.
FROM microsoft/dotnet:2.2-sdk AS build
WORKDIR /app
COPY <your app>.csproj .
RUN dotnet restore <your app>.csproj
COPY . .
RUN dotnet publish -c Release -o out
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS runtime
WORKDIR /app
COPY --from=build /app/out ./
ENTRYPOINT ["dotnet", "<your app>.dll"]
You can use the command dotnet new console to create a basic console app project and then copy your file on top of the generated Program.cs file to replace it.
I've taken the liberty of replacing your .NET core 2.2 images with .NET 6.0 ones, as the 2.2 ones aren't supported anymore.
If you name your file with the code in it 'MyFile.cs' and use this Dockerfile, it should work
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
RUN dotnet new console
COPY MyFile.cs Program.cs
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/runtime:6.0
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "app.dll"]
Build and run with
docker build -t testimage .
docker run --rm testimage
With the changes made to .NET 6 you no longer need a lot of the boilerplate C# code, so you can also reduce your program file to a single line
Console.WriteLine("Hello World!");
Maybe you change your approach: Create a full Webapp and use the CSharpCodeProvider. You can read more about the CSharpCodeProvider here: https://learn.microsoft.com/en-us/troubleshoot/dotnet/csharp/compile-code-using-compiler
.csproj stands there for a reason. To compile .cs file(s) without it, you have to find the corresponding command-line arguments to construct the minimal set of
configurations while compiling (like -I, -D, -L, etc while compiling a C/C++ project), which will cause your project is not familiar with standard IDEs (VS, VSCode) and take more time for transferring how-to-build to your teammates.
In most production-like applications, thing gets complex and you'll soon need a project configuration file. That's why there are Makefile in C/C++ project, pom.xml in Java-Maven project, etc.
IMO, "over" simplifying doesn't make your project simpler. Focusing on how to solve a business problem using the default configuration and minimize/simplify it when there's a need would be a better choice.

ASP.NET Core: Docker restore/build failed to include the 3rd party assembly from project

Good day everyone,
I'm trying to containerize my ASP.NET Core Application. In my previous projects, this sample docker file works perfectly fine.
FROM microsoft/dotnet:sdk AS build-env
COPY . /app
WORKDIR /app/MyApp
RUN dotnet build
RUN dotnet publish -c Release -o out
FROM microsoft/dotnet:2.2-aspnetcore-runtime
EXPOSE 80
WORKDIR /app
COPY --from=build-env /app/MyApp/out .
ENTRYPOINT [ "dotnet","MyApp.dll" ]
But the problem is, I have a project application that uses a 3rd party assembly or dll (Covered by red marker).
In my local project solution, it compiles and runs alright. But when I'm trying to build my project image, the C# files that use that assembly return an error, it says The type or namespace name 'the_assembly' could not be found. This happens when the docker step is in RUN dotnet build,RUN dotnet restore or RUN dotnet publish...
Any help please?
Check your csproj file if it holds that dll reference as realitve location somewhere in your solution. Maybe you have it in some other place, so this file is not included in docker copy.

How to build a Docker image with multiple dependencies for .NET Solution?

It could be kind of long, but I think it's easy to read... So let's begin ...
I have an IoT-Edge Solution created with IoT Edge Tools.
It generates a Dockerfile which works nice for a project without external DLLs as dependencies.
The problem comes when I add multiple DLLs(MySqlAdapter, BaseAdapter, Helper) in this module (MyEdgeModule), without changing the Dockerfile when trying to build an image,
It throws an error:
Skipping project "/MySqlAdapter/MySqlAdapter.csproj" because it was not found.
Skipping project "/MySqlAdapter/MySqlAdapter.csproj" because it was not found.
...
... : warning : The referenced project '../MySqlAdapter/MySqlAdapter.csproj' does not exist. [/app/MyEdgeModule.csproj]
and here is the generated Dockerfile for the MyEdgeModule
FROM microsoft/dotnet:2.1-sdk AS build-env
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out
FROM microsoft/dotnet:2.1-runtime-stretch-slim
WORKDIR /app
COPY --from=build-env /app/out ./
RUN useradd -ms /bin/bash moduleuser
USER moduleuser
ENTRYPOINT ["dotnet", "MyEdgeModule.dll"]
These class library projects are located at "../{projname}/*.csproj" from the Dockerfile.
So I tried to relatively add these projects individually to the Dockerfile just to see if's gonna work but with no success.
I even got on this from the documentation that it's said:
The path must be inside the context of the build; you cannot COPY ../something /something, because the first step of a docker build is to send the context directory (and subdirectories) to the docker daemon.
As far as I understand my context is the folder from which I try to go back, to find my Dependency Projects which seems impossible.
How can I create an image for this project, assuming that it has dozens of external DLLs as dependencies ?
A Thing that works for now is creating a fresh .NET Core project and using the Add Docker Support, each time when you generate it, it will refresh it Dockerfile with all of the dependecies from the References.
In order to work Dockerfile needs to be moved to the solution directory, instead in the project folder where it's generated.
Auto generated Dockerfile doesn't work at my situation.
COPY failed: stat /var/lib/docker/tmp/docker-builder471019165/src/server/MyWebService/MyWebService.csproj: no such file or directory

ASP.NET Core docker build error

I'm new to ASP.NET Core and docker.
I've created a simple ASP.NET Core 2.0 app and try to use docker with it on Windows. However, I get this error:
Your Docker server host is configured for 'Linux', however the docker-compose project targets 'Windows'.
Although it seems to be pretty informative error, I can't find where to 'configure host for Windows'
It is docker-compose.dcproj file where you can set up the OS you want to target:
<DockerTargetOS>Linux</DockerTargetOS>
To switch docker daemon to the same OS you can use Docker tray icon or Docker Settings window (accessible from the same menu):
Well basically the answer of Celestin Bochis and Pavel Agarkov are great. However since .net core 2.2 at least, the os of docker is stored in the .csproj file.
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
...
</PropertyGroup>
...
</Project>
And also don't forget to modify your docker file. The images should be the correct one. For .net core 2.2 That is :
Linux:
Microsoft/dotnet:2.2-aspnetcore-runtime AS base
microsoft/dotnet:2.2-sdk AS build
Windows:
microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803
microsoft/dotnet:2.2-sdk-nanoserver-1803
Make sure to choose the correct OS when you Enable docker support:
Your docker daemon has to target Linux containers as well.
If the docker is running on the windows machine then you need to change the value of "DockerTargetOS" should be "Windows" in .dcproj file.
Unload the docker project from visual studio and edit the project and set the value "Windows" to "DockerTargetOS".
<DockerTargetOS>Windows</DockerTargetOS>
I got this error when I created the project to target Windows and later wanted to switch it to target to Linux. The steps are a little bit more involved if you want to use Linux containers instead:
Unload docker-compose, edit the DockerTargetOS to Linux, then reload the project
Go to docker-compose.yml. Make sure that the backslash is a forward slash. Should look like "WebApplication/Dockerfile"
On the Dockerfile, for the base use "microsoft/aspnetcore:2.0" and for build, use "microsoft/aspnetcore-build:2.0" so it should look like this:
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 80
FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY WebApplication7/WebApplication.csproj WebApplication/
RUN dotnet restore WebApplication/WebApplication.csproj
COPY . .
WORKDIR /src/WebApplication
RUN dotnet build WebApplication.csproj -c Release -o /app
Right click on the Docker tray icon > settings > Shared Drives > pick the drive your project resides in.

Categories