2

I want to create a windows executable file (.exe) which should install the docker toolbox (docker-machine,docker-compose,virtualbox) in windows.

I should also have to bundle the docker-compose and dockerfiles inside the .exe file. So that once the tool box is installed, it should call the docker-compose file and container should be started as i defined in the dockerfile.

I want to automate this process in a single click instead of allowing everyone to install all these components and start the containers manually.

Is it possible to accomplish this? i am trying to use NSIS or Inno setup.

Barton Chittenden
  • 4,238
  • 2
  • 27
  • 46
Jugi
  • 1,244
  • 3
  • 23
  • 51

1 Answers1

3

I think so.

If you bundle the docker toolbox installer inside your InnoSetup, you can call it using a "/silent" like parameter, then copy your docker-compose executable and create shortcuts which will call your docker-compose commands.

Don't include the docker file. Instead include the whole image using docker save and docker load. Or use docker-compose to download your image from a registry.

Regards

Carlos Rafael Ramirez
  • 5,984
  • 1
  • 29
  • 36
  • thanks for the suggestion. Can you please tel me why not to bundle the dockerfile ? – Jugi Dec 13 '16 at 14:04
  • 2
    Because even in the case you distribute in the traditional way, you don't distribute the Dockerfile. The Dockerfile should be used as a reference or for extending. But for a packaged application it is not required for running containers only the image is required – Carlos Rafael Ramirez Dec 13 '16 at 14:32
  • I need to get some of the parameters for the container such as port, versions and few other things from the user while executing the installer file. How can i pass these parameters to build the container if i save the image instead of use dockerfile ? – Jugi Dec 14 '16 at 09:06