I'm trying to run a .Net 4.72 app on Docker. That app executed perfectly on my computer, but when I run it on a Docker container, I receive error while loading librdkafka.dll or its dependencies from C:\temp\source\bin\x64\Debug\librdkafka\x64\librdkafka.dll. Check the directory exists, if not check your deployment process. You can also load the library and its dependencies by yourself before any call to Confluent.Kafka
.
I verified it's there using a dir command on that folder
This is how my Dockerfile looks like:
FROM mcr.microsoft.com/windows/servercore:ltsc2019
WORKDIR /source
COPY "./bin/x64/Debug/." "c:/temp/source/bin/x64/Debug/"
RUN powershell.exe dir c:/temp/source/bin/x64/Debug/librdkafka/x64
CMD ["c:/temp/source/bin/x64/Debug/testeh.exe"]
CodePudding user response:
Problem solved after installing the VC Runtime
ADD https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963AEAD48/vc_redist.x64.exe /vc_redist.x64.exe
RUN C:\vc_redist.x64.exe /quiet /install