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

  • Docker initialization on OSX: is a dial error normal?
  • my own customizations of boot2docker are not reflected into the iso image
  • How to copy docker volume to local?
  • Direct access to containers using Boot2Docker
  • Managed VM add to PATH
  • Docker pull repositoryName don't work can't see public repos
  • Make pdb work with docker
  • What's a workable way setup an Akka cluster in a multi-node Docker environment?
  • Using Docker with Sensu
  • How does Docker run a Linux kernel under macOS host?
  • Can close properly a websocket with docker
  • call a docker container from another container
  • 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.