Difference between installing service in Windows Container and Windows Server 2016?

I have a service application that will install correctly in Windows Server 2016 Standard using the following command:

PS C:\Service> c:\\mysvc\\mysvc.exe -install
Service installed successfully

If I run the same thing when in a Dockerfile using:

  • How do you list volumes in docker containers?
  • run docker exec from swarm manager
  • Lite virtualization of processes
  • How to add external my.cnf file to Percona server in Docker?
  • Simpliest Dockerfile ever to untar: file not found
  • Getting docker pull to default pull from a private registry?
  • RUN c:\\mysvc\\mysvc.exe -install
    

    I get the following output:

    The command ‘cmd /S /C c:\svc\mysvc.exe -install’ returned a
    non-zero code: 3221225781

    I’m not sure why it is behaving differently, or where I could check to get some better ideas as to the cause of the error.

  • Docker : How To Dockerize And Deploy multiple instances of a LAMP Application
  • Move file downloaded in Dockerfile to harddrive
  • Where to find more explicit errors given container error status codes?
  • Is this normal for docker?
  • docker-compose oci runtime error starting container process caused connection reset by peer
  • Not able to connect to docker containers using SSH [closed]
  • One Solution collect form web for “Difference between installing service in Windows Container and Windows Server 2016?”

    A useful tip for debugging this sort of issue is to run the base image in an interactive container, follow the steps for your Dockerfile and see if you get some more useful output.

    In your case, something like:

    docker run -it --name temp microsoft/windowsservercore cmd
    

    Then in another command on the Windows host:

    docker cp mysvc.exe temp:c:/mysvc.exe
    

    And back in the interactive container run c:\mysvc -install.

    If the output doesn’t help, you could add some more details to your question here – the Dockerfile and some info about the Windows service.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.