Can Docker help build executable that work in different platform

I am new to docker and so my question could be very naive/stupid. The application that we use presently need to be compiled in different platform to make it work in desired platform i.e Linux and Window mainly. So we need to compile source code(C/C++) in different platform and give different executable to customer as per their OS .
My question is
1. Is it possible with docker that i have one executable which work in all platform ? i.e i compile my source code in one platform e.g in Linux and ship executable with docker to run in Window platform

Thanks in advance

  • Vagrant ssh to Docker container
  • Error with docker login: no such host
  • Docker Compose vs. Dockerfile - which is better?
  • NFS Volumes in Docker/Docker-Compose
  • How do I modify a startup script in a docker container when it is stopped?
  • Boot2Docker: Can't create directory: Protocol Error
  • How do I copy the files from one directory to another using a dockerfile?
  • How to expose docker container from Rancher's private network?
  • Volume and data persistence
  • Openshift postfix server not starting
  • Error running commands with Dockerfile
  • Navigate / access docker-machine file system
  • 3 Solutions collect form web for “Can Docker help build executable that work in different platform”

    You still need to compile source code on different platforms. The point of the docker is to automate building and testing the code on every platform, so that you can just work on the code, and let it build and test on every platform.

    You do have to set up the dockers and test scripts and get the code working cross-platform in the first place. But after that is done, you can basically not worry about any other platform unless you actually break it.

    Docker allows to run run the same container in any modern Linux distribution – you only need docker installed here. You cannot run these containers directly on Windows – you need to run virtual machine with Linux which will run docker container. That is what boot2docker is doing – running docker containers on Windows and Mac Os X in virtual machine. In some cases it is acceptable.

    No it can’t, docker is Linux only. To run docker in Windows, you need a virtual machine.

    Unless you spend the time to wrap your installer script to install the virtual machine and all, you might as well just run a proper VM in a Virtual Box or VMWare of your choice. Even then your application experience on Windows will be second rate as it’s not running natively.

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