I am hoping someone from AppDynamics respond to the thread!
Here is what I did to gain more control over OS, Runtimes, etc.-
Created my own image to comply with AppD requirement on OS.
Got ubuntu 18.04, installed all the prerequisits and installed dotnetcore runtime following this link
https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x
Then, I went to Visual Studio 2017 and updated my dockerfile to use the modified image (ubuntu:prodip). It builds fine and my ASP.NET Core application works like magic! Still AppD instrumentation does not work and I don't see any logs or errors!
FROM ubuntu:18.04
# Install required packages
RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y unzip && \ apt-get clean
RUN apt-get install -y sudo RUN apt-get install -y wget RUN apt-get install -y curl
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb RUN sudo dpkg -i packages-microsoft-prod.deb
RUN sudo apt-get install apt-transport-https
RUN sudo apt-get update
#RUN sudo apt-get install liblttng-ust0 #RUN sudo apt-get install libcurl3 RUN sudo apt-get install libssl1.0.0 #RUN sudo apt-get install libkrb5-3 #RUN sudo apt-get install zlib1g RUN sudo apt-get install libicu60
RUN sudo apt-get install libunwind8 RUN sudo apt-get install libuuid1 RUN sudo apt-get update
COPY ./dotnet-install.sh .
RUN sudo ./dotnet-install.sh --channel 2.0 --install-dir ~/cli
ENV PATH="/root/cli:${PATH}"
#run this command to build the image
#docker build -t ubuntu:prodip .
This is the updated dockerfile used to build the app in Visual Studio:
FROM ubuntu:prodip ARG source WORKDIR /app ENV ASPNETCORE_URLS=http://+:80
ENV COR_ENABLE_PROFILING="1" ENV COR_PROFILER="{57e1aa68-2229-41aa-9931-a6e93bbc64d8}" ENV COR_PROFILER_PATH="/app/runtimes/linux-x64/native/libappdprofiler.so"
EXPOSE 80 COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["dotnet", "gdt.api.demo.dotnetcore.dll"]
I do bin/bash into the container and here is what I see for OS version metadata:
root@830f31b00d37:/# cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS" NAME="Ubuntu" VERSION="18.04.1 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.1 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic root@830f31b00d37:/#
My ENV variables include AppD stuff. Don't know if PWD and OLDPDW has anything to do with my changes!
COR_PROFILER={57e1aa68-2229-41aa-9931-a6e93bbc64d8} HOSTNAME=830f31b00d37 COR_ENABLE_PROFILING=1 ASPNETCORE_URLS=http://+:80 COR_PROFILER_PATH=/app/runtimes/linux-x64/native/libappdprofiler.so PWD=/ HOME=/root TERM=xterm SHLVL=1 PATH=/root/cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin _=/usr/bin/env OLDPWD=/app/runtimes/linux-x64/native
libappdprofiler.so is found in the expected location:
root@830f31b00d37:/# cd /app/runtimes/linux-x64/native root@830f31b00d37:/app/runtimes/linux-x64/native# ls libappdprofiler.so root@830f31b00d37:/app/runtimes/linux-x64/native#
AppD- Can you help?
... View more