Giter Club home page Giter Club logo

docker-machine-vmwareworkstation's Introduction

Docker Machine VMware Workstation Driver

This plugin for Docker Machine creates Docker hosts locally on a VMware Workstation.

This is a placeholder and collaboration point to add a VMware workstation driver for Docker Machine. This driver reuses part of the code from the fusion driver bundled with Docker Machine (as both have the same executable) and includes additional code from Packer VMware driver to detect the location of the files on Windows systems.

This is still a work-in-progress (WIP). I'm working to add the functionality listed on the TODO list. Suggestions and contributions are welcome.

TODO

  • drivers/vmwareworkstation/workstation.go: Rework file for vmware workstation
  • add windows support
  • add cmd/machine-driver-vmwareworkstation.go
  • Add Linux/OSX support
  • Add dhcplease file discovery on windows
  • Add tests cases
  • Create makefile
  • Add docs/drivers/vm-workstation.md

Requirements

Installation

The latest version of docker-machine-driver-vmwareworkstation binary is available on the "Releases" page.

Place the executable in the directory containing docker-machine.exe, or else add it to your $PATH.

Installing with Docker Toolbox

Install Docker Toolbox without VirtualBox:

DockerToolbox-.exe /COMPONENTS="Docker,DockerMachine"

Usage

Official documentation for Docker Machine is available here.

To create a VMware Workstation based Docker machine, just run this command:

docker-machine create --driver=vmwareworkstation default
@FOR /f "tokens=*" %i IN ('docker-machine env default') DO @%i
docker run hello-world

or

docker run -it -v /c/Users/<Your Folder>:/test-folder/ ubuntu bash
ll /test-folder/

Options

  • --vmwareworkstation-boot2docker-url: The URL of the Boot2Docker image.
  • --vmwareworkstation-disk-size: Size of disk for the host VM (in MB).
  • --vmwareworkstation-memory-size: Size of memory for the host VM (in MB).
  • --vmwareworkstation-cpu-count: Number of CPUs to use to create the VM (-1 to use the number of CPUs available).
  • --vmwareworkstation-ssh-user: SSH user
  • --vmwareworkstation-ssh-password: SSH password
  • --vmwareworkstation-no-share: Disable the mount of your home directory
  • --vmwareworkstation-share-folder: Mount the specified directory instead of the default home location. Format: name:dir

The --vmwareworkstation-boot2docker-url flag takes a few different forms. By default, if no value is specified for this flag, Machine checks locally for a Boot2Docker ISO. If one is found, that will be used as the ISO for the new machine. If one is not found, the latest ISO release available on boot2docker/boot2docker will be downloaded and stored locally for future use. Note that this means you must run docker-machine upgrade deliberately on a machine if you wish to update the "cached" Boot2Docker ISO.

This is the default behavior (when --vmwareworkstation-boot2docker-url=""), but the option also supports specifying ISOs by the http:// and file:// protocols.

Environment variables and default values:

CLI option Environment variable Default
--vmwareworkstation-boot2docker-url WORKSTATION_BOOT2DOCKER_URL Latest boot2docker url
--vmwareworkstation-cpu-count WORKSTATION_CPU_COUNT 2
--vmwareworkstation-disk-size WORKSTATION_DISK_SIZE 40000
--vmwareworkstation-memory-size WORKSTATION_MEMORY_SIZE 4048
--vmwareworkstation-ssh-user WORKSTATION_SSH_USER docker
--vmwareworkstation-ssh-password WORKSTATION_SSH_PASSWORD tcuser
--vmwareworkstation-no-share WORKSTATION_NO_SHARE false
--vmwareworkstation-share-folder WORKSTATION_SHARE_FOLDER Linux: /home Windows: C:\Users\

Development

Build from Source

If you wish to work on VMware Workstation Driver for Docker machine, you'll first need:

  • Go installed (version 1.11+ is required).

    • Make sure Go is properly installed, including setting up a GOPATH.
  • Task

  • Currently, the build only works on Windows (WIP to get it to work on other platforms)

To build the plugin executable binary, run these commands:

$ set GO111MODULE=on
$ go get -d github.com/goldfix/docker-machine-vmwareworkstation
$ cd %GOPATH%/src/github.com/goldfix/docker-machine-vmwareworkstation
$ task

The build creates the binary as %GOPATH%/bin/docker-machine-driver-vmwareworkstation.

Authors

Credits

docker-machine-vmwareworkstation's People

Contributors

gitter-badger avatar goldfix avatar jcogilvie avatar kersing avatar pecigonzalo avatar tsugliani avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.