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

  • Is it possible to run kubernetes as a docker container?
  • Ubuntu Docker image broken out of the box?
  • boot2docker workflow for building an image
  • How to copy docker volume to local?
  • Error in build from Dockerfile for Ubuntu image with Mono installed
  • boot2docker startup script to mount local shared folder with host
  • Docker relationship to VMs and LXC
  • How can a docker service know about all other containers of the same service?
  • Setting the docker server IP as an environment variable using the gradle-docker-plugin
  • Docker ADD then RUN
  • Cronjob not working on CentOS 6.5 Docker container
  • How to escape Fish shell variable to use as awk pattern?
  • 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.