{"id":13607043,"url":"https://github.com/pecigonzalo/docker-machine-vmwareworkstation","last_synced_at":"2025-04-06T15:13:36.933Z","repository":{"id":57500897,"uuid":"46313084","full_name":"pecigonzalo/docker-machine-vmwareworkstation","owner":"pecigonzalo","description":"VMWare Workstation driver for Docker Machine https://github.com/docker/machine","archived":false,"fork":false,"pushed_at":"2020-03-25T17:07:32.000Z","size":75,"stargazers_count":365,"open_issues_count":16,"forks_count":67,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-30T13:11:07.507Z","etag":null,"topics":["docker-machine","docker-machine-driver","vmware-workstation","vmware-workstation-driver"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pecigonzalo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-17T00:47:40.000Z","updated_at":"2024-12-15T17:00:03.000Z","dependencies_parsed_at":"2022-08-31T11:03:12.703Z","dependency_job_id":null,"html_url":"https://github.com/pecigonzalo/docker-machine-vmwareworkstation","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecigonzalo%2Fdocker-machine-vmwareworkstation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecigonzalo%2Fdocker-machine-vmwareworkstation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecigonzalo%2Fdocker-machine-vmwareworkstation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecigonzalo%2Fdocker-machine-vmwareworkstation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pecigonzalo","download_url":"https://codeload.github.com/pecigonzalo/docker-machine-vmwareworkstation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500469,"owners_count":20948880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-machine","docker-machine-driver","vmware-workstation","vmware-workstation-driver"],"created_at":"2024-08-01T19:01:15.052Z","updated_at":"2025-04-06T15:13:36.916Z","avatar_url":"https://github.com/pecigonzalo.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Docker Machine VMware Workstation Driver\n\n[![Join the chat at https://gitter.im/pecigonzalo/docker-machine-vmwareworkstation](https://badges.gitter.im/pecigonzalo/docker-machine-vmwareworkstation.svg)](https://gitter.im/pecigonzalo/docker-machine-vmwareworkstation?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/k8j7ej2a7t58p2r0/branch/master?svg=true)](https://ci.appveyor.com/project/pecigonzalo/docker-machine-vmwareworkstation)\n\nThis plugin for [Docker Machine](https://docs.docker.com/machine/) creates\nDocker hosts locally on a [VMware\nWorkstation](https://www.vmware.com/products/workstation).\n\nThis is a placeholder and collaboration point to add a VMware workstation\ndriver for Docker Machine. This driver reuses part of the code from the [fusion\ndriver](https://github.com/docker/machine/tree/master/drivers/vmwarefusion)\nbundled with Docker Machine (as both have the same executable) and includes\nadditional code from [Packer](https://packer.io) VMware driver to detect the\nlocation of the files on Windows systems.\n\nThis is still a work-in-progress (WIP). I'm working to add the functionality\nlisted on the TODO list. Suggestions and contributions are welcome.\n\n## TODO\n\n* ~~drivers/vmwareworkstation/workstation.go: Rework file for vmware workstation~~\n* ~~add windows support~~\n* ~~add cmd/machine-driver-vmwareworkstation.go~~\n* Add Linux/OSX support\n* ~~Add dhcplease file discovery on windows~~\n* Add tests cases\n* ~~Create makefile~~\n* Add docs/drivers/vm-workstation.md\n\n## Requirements\n* Windows 7+ (for now)\n* [Docker Machine](https://docs.docker.com/machine/) 0.5.0+\n* [VMware Workstation](https://www.vmware.com/products/workstation) Workstation Free/Pro 10 +\n\n## Installation\n\nThe latest version of `docker-machine-driver-vmwareworkstation` binary is\navailable on the\n[\"Releases\"](https://github.com/pecigonzalo/docker-machine-vmwareworkstation/releases)\npage.\n\nPlace the executable in the directory containing `docker-machine.exe`, or else\nadd it to your $PATH.\n\n## Installing with Docker Toolbox\n\n1.  Install Docker Toolbox without VirtualBox\n\n    `DockerToolbox-.exe /COMPONENTS=\"Docker,DockerMachine\"`\n\n2.  Replace contents of `C:\\Program Files\\Docker Toolbox\\start.sh` with this script.\n\n    ```none\n    #!/bin/bash\n\n    export PATH=\"$PATH:/mnt/c/Program Files (x86)/VMware/VMware Workstation\"\n\n    trap '[ \"$?\" -eq 0 ] || read -p \"Looks like something went wrong in step ´$STEP´... Press any key to continue...\"' EXIT\n\n    VM=${DOCKER_MACHINE_NAME-default}\n    DOCKER_MACHINE=./docker-machine.exe\n\n    BLUE='\\033[1;34m'\n    GREEN='\\033[0;32m'\n    NC='\\033[0m'\n\n\n    if [ ! -f \"${DOCKER_MACHINE}\" ]; then\n      echo \"Docker Machine is not installed. Please re-run the Toolbox Installer and try again.\"\n      exit 1\n    fi\n\n    vmrun.exe list | grep \\\"\"${VM}\"\\\" \u0026\u003e /dev/null\n    VM_EXISTS_CODE=$?\n\n    set -e\n\n    STEP=\"Checking if machine $VM exists\"\n    if [ $VM_EXISTS_CODE -eq 1 ]; then\n      \"${DOCKER_MACHINE}\" rm -f \"${VM}\" \u0026\u003e /dev/null || :\n      rm -rf ~/.docker/machine/machines/\"${VM}\"\n      #set proxy variables if they exists\n      if [ -n ${HTTP_PROXY+x} ]; then\n        PROXY_ENV=\"$PROXY_ENV --engine-env HTTP_PROXY=$HTTP_PROXY\"\n      fi\n      if [ -n ${HTTPS_PROXY+x} ]; then\n        PROXY_ENV=\"$PROXY_ENV --engine-env HTTPS_PROXY=$HTTPS_PROXY\"\n      fi\n      if [ -n ${NO_PROXY+x} ]; then\n        PROXY_ENV=\"$PROXY_ENV --engine-env NO_PROXY=$NO_PROXY\"\n      fi  \n      \"${DOCKER_MACHINE}\" create -d vmwareworkstation $PROXY_ENV \"${VM}\"\n    fi\n\n    STEP=\"Checking status on $VM\"\n    VM_STATUS=\"$(${DOCKER_MACHINE} status ${VM} 2\u003e\u00261)\"\n    if [ \"${VM_STATUS}\" != \"Running\" ]; then\n      \"${DOCKER_MACHINE}\" start \"${VM}\"\n      yes | \"${DOCKER_MACHINE}\" regenerate-certs \"${VM}\"\n    fi\n\n    STEP=\"Setting env\"\n    eval \"$(${DOCKER_MACHINE} env --shell=bash ${VM})\"\n\n    STEP=\"Finalize\"\n    clear\n    cat \u003c\u003c EOF\n\n\n                            ##         .\n                      ## ## ##        ==\n                   ## ## ## ## ##    ===\n               /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\\___/ ===\n          ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~\n               \\______ o           __/\n                 \\    \\         __/\n                  \\____\\_______/\n\n    EOF\n    echo -e \"${BLUE}docker${NC} is configured to use the ${GREEN}${VM}${NC} machine with IP ${GREEN}$(${DOCKER_MACHINE} ip ${VM})${NC}\"\n    echo \"For help getting started, check out the docs at https://docs.docker.com\"\n    echo\n    cd\n\n    docker () {\n      MSYS_NO_PATHCONV=1 docker.exe \"$@\"\n    }\n    export -f docker\n\n    if [ $# -eq 0 ]; then\n      echo \"Start interactive shell\"\n      exec \"$BASH\" --login -i\n    else\n      echo \"Start shell with command\"\n      exec \"$BASH\" -c \"$*\"\n    fi\n    ```\n\n    Credit for the above script to [@gtirloni](https://github.com/gtirloni)\n\n## Usage\n\nOfficial documentation for Docker Machine is available\n[here](https://docs.docker.com/machine/).\n\nTo create a VMware Workstation based Docker machine, just run this\ncommand:\n\n```bash\n$ docker-machine create --driver=vmwareworkstation dev\n```\n\n## Options\n\n - `--vmwareworkstation-boot2docker-url`: The URL of the [Boot2Docker](https://github.com/boot2docker/boot2docker) image.\n - `--vmwareworkstation-disk-size`: Size of disk for the host VM (in MB).\n - `--vmwareworkstation-memory-size`: Size of memory for the host VM (in MB).\n - `--vmwareworkstation-cpu-count`: Number of CPUs to use to create the VM (-1 to use the number of CPUs available).\n - `--vmwareworkstation-ssh-user`: SSH user\n - `--vmwareworkstation-ssh-password`: SSH password\n - `--vmwareworkstation-no-share`: Disable the mount of your home directory\n - `--vmwareworkstation-share-folder`: Mount the specified directory instead of the default home location. Format: name:dir\n - `--vmwareworkstation-guest-share-link`: Additional link to the shared mount in the guest\n\nThe `--vmwareworkstation-boot2docker-url` flag takes a few different forms. By\ndefault, if no value is specified for this flag, Machine checks locally for a\nBoot2Docker ISO. If one is found, that will be used as the ISO for the new\nmachine. If one is not found, the latest ISO release available on\n[boot2docker/boot2docker](https://github.com/boot2docker/boot2docker) will be\ndownloaded and stored locally for future use. Note that this means you must run\n`docker-machine upgrade` deliberately on a machine if you wish to update the\n\"cached\" Boot2Docker ISO.\n\nThis is the default behavior (when `--vmwareworkstation-boot2docker-url=\"\"`),\nbut the option also supports specifying ISOs by the `http://` and `file://`\nprotocols.\n\nEnvironment variables and default values:\n\n| CLI option                            | Environment variable          | Default                  |\n|---------------------------------------|-------------------------------|--------------------------|\n| `--vmwareworkstation-boot2docker-url` | `WORKSTATION_BOOT2DOCKER_URL` | *Latest boot2docker url* |\n| `--vmwareworkstation-cpu-count`       | `WORKSTATION_CPU_COUNT`       | `1`                      |\n| `--vmwareworkstation-disk-size`       | `WORKSTATION_DISK_SIZE`       | `20000`                  |\n| `--vmwareworkstation-memory-size`     | `WORKSTATION_MEMORY_SIZE`     | `1024`                   |\n| `--vmwareworkstation-ssh-user`        | `WORKSTATION_SSH_USER`        | `docker`                 |\n| `--vmwareworkstation-ssh-password`    | `WORKSTATION_SSH_PASSWORD`    | `tcuser`                 |\n| `--vmwareworkstation-no-share`        | `WORKSTATION_NO_SHARE`        | `false`                  |\n| `--vmwareworkstation-share-folder`    | `WORKSTATION_SHARE_FOLDER`    | Linux: `/home` Windows: `C:\\Users\\` |\n| `--vmwareworkstation-share-compat`    | `WORKSTATION_SHARE_COMPAT`    | Windows: `/c/Users` |\n\n## Development\n\n### Build from Source\n\nIf you wish to work on VMware Workstation Driver for Docker machine, you'll\nfirst need:\n\n* [Go](http://www.golang.org) installed (version 1.6+ is required).\n  * Make sure Go is properly installed, including setting up a [GOPATH](http://golang.org/doc/code.html#GOPATH).\n\n* [MSYS](https://msys2.github.io/)\n  * **Make** We well need to use pacman to install make\n\n* Currently, the build only works on Windows (WIP to get it to work on\n  other platforms)\n\nTo build the plugin executable binary, run these commands:\n\n```bash\n$ go get -d github.com/pecigonzalo/docker-machine-vmwareworkstation\n$ cd $GOPATH/github.com/pecigonzalo/docker-machine-vmwareworkstation\n$ make\n```\n\nThe build creates the binary as `bin/docker-machine-driver-vmwareworkstation`. If you want, copy it to `${GOPATH}/bin/`.\n\n\n## Authors\n\n* Gonzalo Peci ([@pecigonzalo](https://github.com/pecigonzalo))\n\n## Credits\n\n* Partial copy of the README from https://github.com/Parallels/docker-machine-parallels\n* [Packer](https://packer.io) VMware Workstation driver functions\n* [gtirloni](https://github.com/gtirloni) Instructions for Docker Toolbox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpecigonzalo%2Fdocker-machine-vmwareworkstation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpecigonzalo%2Fdocker-machine-vmwareworkstation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpecigonzalo%2Fdocker-machine-vmwareworkstation/lists"}