I have a big problem: I have to copy a .dll file into my Docker Image. I can't pull it from NuGet, because it's a private package and you can't pull it normally via a url and nuget.config. I asked my colleagues and they said I should copy the file into the Docker Image. Does someone have an idea how to do it?
I have copied this .dll file into my normal project directory. But I have no idea where to copy it or how to do that.
This is my DockerFile:
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["DoKiva/DoKiva.csproj", "DoKiva/"]
RUN dotnet restore "DoKiva/DoKiva.csproj"
COPY . .
WORKDIR "/src/DoKiva"
RUN dotnet build "DoKiva.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DoKiva.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DoKiva.dll"]
If you could help me I would really appreciate it!
My Docker Build Command is docker build -t dokivac .