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:

  • Deployment of multiple instances of Tomcat in single Dockerfile using Supervisor
  • Docker's healthcheck on Windows container and exit code (“||” linux equivalent)
  • SSL on dokku+nginx
  • Download logs from docker containers
  • How to run ansible script inside a docker container
  • What is the convention to include supporting services in a project that uses docker?
  • 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.

  • share ports between docker and vagrant
  • Error response from daemon: (config) includes invalid characters for a local volume name
  • How to achieve cpu-throttling in docker swarm mode: docker service create
  • Modifying a docker image
  • Docker breaks autofs directory in V1.5, used to work in V1.3.3
  • Could not launch environment: Application version is unusable and cannot be used with an environment
  • 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.