Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

ProGet net5.0 docker run in centos 7.8 web can't start(5.3.17)



  • inedo/proget:5.3.17
    Host: CentOS Linux release 7.8.2003 (Core)
    Docker: version 19.03.5, build 633a0ea

    Reference office Linux docker documentation, docker run inedo/proget:5.3.17,

    docker logs proget without any error, but WebApplication not started/Listen to port 80.

    docker exec -it proget bash, use dotnet ProGet.WebApplication.dll manual start Web, start with error: "Access to the path '/proc/1/map_files' is denied"
    ref github issues: https://github.com/dotnet/dotnet-docker/issues/644
    this may miss WORKDIR in Dockerfile.

    Now we create a local Dockerfile with content:

    FROM proget.inedo.com/productimages/inedo/proget:5.3.17
    WORKDIR /usr/local/proget
    

    then build and run, can resolve this problem,
    can you add WORKDIR official to resolve the compatibility with CentOS 7.


  • inedo-engineer

    Hello, thank you for helping to identify this issue, and how we can solve it.

    Just so I can understand the situation, I want to confirm that setting the WORKDIR will allow ProGet to run on CentOS7?

    If so, do you think editing our Dockerfile like below (see the line I added) will fix the issue? It seems something easy we can try in the next release then.

    FROM mcr.microsoft.com/dotnet/aspnet:5.0.0
    
    EXPOSE 80
    
    COPY proget/ /usr/local/proget/
    
    ****** ADD THIS LINE ****
    WORKDIR /usr/local/proget/
    ****** / ADD THIS LINE ****
    
    ENV SQL_CONNECTION_STRING "Data Source=proget-sql; Initial Catalog=ProGet; User Id=sa; Password=;"
    ENV PROGET_SVC_MODE both
    
    VOLUME /var/proget/packages
    VOLUME /var/proget/extensions
    VOLUME /usr/share/Inedo/SharedConfig
    
    CMD ([ -f /usr/share/Inedo/SharedConfig/ProGet.config ] || echo '<?xml version="1.0" encoding="utf-8"?><InedoAppConfig><ConnectionString Type="SqlServer">'"`$SQL_CONNECTION_STRING"'</ConnectionString><WebServer Enabled="true" Urls="http://*:80/"/></InedoAppConfig>' > /usr/share/Inedo/SharedConfig/ProGet.config) \
    && exec /usr/local/proget/service/ProGet.Service run --mode=`$PROGET_SVC_MODE --linuxContainer
    

    Thanks, pleas let me know



  • Hi @atripp

    I've been struggling getting the new version of proget(core) working on our Docker (CentOs) hosts for a while and I can confirm this is the issue!

    This can also be fixed when using a docker compose (stack) file by adding:

    working_dir: /usr/local/proget

    Would still be great to get this built in to the dockerfile during the next release however.

    Thank you @shijiyong_6709 for figuring this out!

    Simon


  • inedo-engineer

    Hi @scroak_6473 good to know! So, I've added the WORKDIR /usr/local/proget/ line right above our CMD line, and it should go in the next release.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation