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:

  • MongoDB Docker Windows dev env. linux production env. possible solution?
  • Add docker publish step to sbt-release process with new tag
  • Cannot connect to MySQL docker instance via DataGrip application
  • Hostname resolution fails when running docker build from a docker container
  • How to push docker images into a private registry with a full URL?
  • Docker Differentiate multiple containers log folder at same host machine
  • 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.

  • Plex using Ansible and Docker
  • VM Instances moved - re-connect via docker-machine
  • Jenkins and running rake tasks
  • redis+elk stack using docker-compose
  • How can I make an overlay network in docker without using docker-machine commands
  • Sometimes import data Mysql in Docker very slow
  • 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.