none
Program error in Nanoserver RRS feed

  • Question

  • I want to run R in a Windows container. It works in servercore, but not in nanoserver.

    To remedy this I am trying a multistage build, where R is installed in a servercore image and then copied to a nanoserver image. Unfortunately, R exits with an error code I am unfamiliar with (3221225781).

    Using Process Explorer I have identified missing runtime dll's in nanoserver and copied these from servercore. This gives a new error code (3221226625).

    I don't get any informative errors, so I pretty stuck. Any help would be appreciated.

    My full Dockerfile is in the end of this post. I build with the command

    docker build --build-arg R_VERSION=3.6.0 --tag r-base:3.6.0 .

    I run the image with the command

     docker run -it r-base:3.6.0

    I don't use the `--rm` flag because I want to see the exit code. 

    FROM mcr.microsoft.com/windows/servercore:1809 AS builder

    ARG R_VERSION
    ENV R_VERSION=${R_VERSION}

    RUN curl.exe -o R-%R_VERSION%-win.exe https://cran.r-project.org/bin/windows/base/old/%R_VERSION%/R-%R_VERSION%-win.exe

    RUN R-%R_VERSION%-win.exe /VERYSILENT /DIR="C:\R\"


    # ------------------------------------------------------------------------------

    FROM mcr.microsoft.com/windows/nanoserver:1809

    COPY --from=builder C:\\R C:\\R

    # System runtime dependencies
    COPY --from=builder \
        C:\\Windows\\System32\\advapi32.dll \
        C:\\Windows\\System32\\clbcatq.dll \
        C:\\Windows\\System32\\comdlg32.dll \
        C:\\Windows\\System32\\CoreMessaging.dll \
        C:\\Windows\\System32\\cryotso.dll \
        C:\\Windows\\System32\\gdi32.dll \
        C:\\Windows\\System32\\gdi32full.dll \
        C:\\Windows\\System32\\imm32.dll \
        C:\\Windows\\System32\\kernel.appcore.dll \
        C:\\Windows\\System32\\msimg32.dll \
        C:\\Windows\\System32\\msvct.dll \
        C:\\Windows\\System32\\ole32.dll \
        C:\\Windows\\System32\\powprof.dll \
        C:\\Windows\\System32\\rpcrt.dll \
        C:\\Windows\\System32\\shell32.dll \
        C:\\Windows\\System32\\shlwapi.dll \
        C:\\Windows\\System32\\TextInputFramework.dll \
        C:\\Windows\\System32\\umpdc.dll \
        C:\\Windows\\System32\\user32.dll \
        C:\\Windows\\System32\\uxtheme.dll \
        C:\\Windows\\System32\\version.dll \
        C:\\Windows\\System32\\win32u.dll \
        C:\\Windows\\System32\\windows.storage.dll \
        C:\\Windows\\System32\\winmm.dll \
        C:\\Windows\\System32\\winmmbase.dll \
        C:\\Windows\\System32/

    CMD [ "C:/R/bin/R.exe" ]

    Sunday, September 8, 2019 1:30 PM

All replies

  • Greetings,

    Nano server doesn't have  some APIs.

    https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/mt588480(v=vs.85)

    In my opinion, it's not good to do copy dlls to nanoserver.


    Sic Parvis Magna

    Friday, September 27, 2019 9:56 AM
  • Thank you for the reply and link. And sorry about my long response time! My notification settings must be wrong.

    Is there a reason why it is not good to copy dlls?

    Saturday, October 19, 2019 6:10 PM
  • For my understanding, after copying dlls, it will be a not supported scenario.

    If the software works in server core, it will be a better choice.


    Sic Parvis Magna

    Sunday, October 20, 2019 1:35 AM