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

  • How to provision Docker images in Vagrant?
  • unable to connect to dockerized mysql container locally
  • Node.js Running Hello World on Google Cloud Platform error deployment error
  • Automation of docker commands
  • GDB problems inside docker
  • ELF Header or installation issue with bcrypt in Docker container
  • How to get a list of images on docker registry v2
  • Environment variables passed to docker run
  • How do I get the address of the host when using 'docker build'?
  • Wierd Docker DNS error referencing C file?
  • How to configure docker for multiple user groups (sudo and non-sudo) with copy/commit restrictions?
  • Build .NET Core Console Application into Docker
  • 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.