All Projects → vweevers → node-docker-share

vweevers / node-docker-share

Licence: MIT license
Share local folders with a Docker Machine VM

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-docker-share

isolated-runtime
Run untrusted Javascript code in a multi-tenant, isolated environment
Stars: ✭ 21 (-30%)
Mutual labels:  vm
cassowary
Run Windows Applications on Linux as if they are native, Use linux applications to launch files files located in windows vm without needing to install applications on vm. With easy to use configuration GUI
Stars: ✭ 1,818 (+5960%)
Mutual labels:  vm
windows-network-drive
Do network drive stuff on Microsoft Window in node
Stars: ✭ 18 (-40%)
Mutual labels:  mount
dokan-delphi
Dokan Delphi Wrapper
Stars: ✭ 48 (+60%)
Mutual labels:  mount
fuse-nfs-crossbuild-scripts
fuse-nfs for windows using dokany
Stars: ✭ 35 (+16.67%)
Mutual labels:  mount
redelay
Clojure library for first class lifecycle-managed state.
Stars: ✭ 44 (+46.67%)
Mutual labels:  mount
inside-vm
Detect if code is running inside a virtual machine (x86 and x86-64 only).
Stars: ✭ 32 (+6.67%)
Mutual labels:  vm
ProxmoxVE PHP API
ProxmoxVE PHP API
Stars: ✭ 78 (+160%)
Mutual labels:  vm
qemujs
Qemu.js source code with proof-of-concept machine-code-to-WASM JIT.
Stars: ✭ 101 (+236.67%)
Mutual labels:  vm
lima
Linux virtual machines, typically on macOS, for running containerd
Stars: ✭ 8,723 (+28976.67%)
Mutual labels:  vm
RSqueak
A Squeak/Smalltalk VM written in RPython.
Stars: ✭ 78 (+160%)
Mutual labels:  vm
craftbox
Simple Ubuntu Vagrant box targeted for Craft developers -
Stars: ✭ 28 (-6.67%)
Mutual labels:  vm
docker-machine-mac-nfs-mount
Docker machine Mac OS X nfs mount
Stars: ✭ 17 (-43.33%)
Mutual labels:  docker-machine
starlight
[WIP] Yet another Erlang implementation in Rust
Stars: ✭ 33 (+10%)
Mutual labels:  vm
render react
Pre-render and mount React components from Ruby
Stars: ✭ 14 (-53.33%)
Mutual labels:  mount
udiskie-dmenu
Manage removable devices in couple of keystrokes!
Stars: ✭ 30 (+0%)
Mutual labels:  mount
winup
Automate a Windows 10 VM setup for coding and testing
Stars: ✭ 21 (-30%)
Mutual labels:  vm
VMwareWorkstation
手动上传官网的VMwareWorkstation安装包
Stars: ✭ 309 (+930%)
Mutual labels:  vm
playing-docker-swarm-docker-machine
Scripts to help you to play with Docker Swarm and Docker Machine
Stars: ✭ 19 (-36.67%)
Mutual labels:  docker-machine
ubuntu-firecracker
Build the ubuntu kernel and rootfs for firecracker
Stars: ✭ 54 (+80%)
Mutual labels:  vm

docker-share

Share local folders with a Docker Machine VM. Currently only capable of adding and mounting transient shares on a running VM.

node npm status Dependency status JavaScript Style Guide

Motivation

On Windows with Docker Toolbox, one can't mount data volumes outside of C:\Users. This makes the use of Docker Compose and relative data volumes (.:/code) rather problematic. As a remedy (when migrating to Windows 10 with Docker for Windows Beta is not an option) we can add a project's directory as a VirtualBox shared folder. Then mount it inside the Docker Machine VM - at the exact same path as on the Windows box so that relative volumes resolve correctly. This tool does this for you (and more, like checking if the share already exists). Its main functionality is roughly equivalent to:

cd C:\projects\my-project

vboxmanage sharedfolder add default ^
  --name my-project --hostpath "%cd%" ^
  --transient

docker-machine ssh default sudo ^
  mkdir -p /c/projects/my-project

docker-machine ssh default sudo ^
  mount -t vboxsf -o ^
  defaults,uid=`id -u docker`,gid=`id -g docker` ^
  my-project /c/projects/my-project

This tool should work on other platforms too. If you've found a use for it, let me know! Or just do a little dance.

Example

These commands should be run after docker-machine start, but before docker run or docker-compose up. Mount the current working directory:

docker-share mount --transient

Mount the current working directory, transient and read-only, at /home/docker/beep on a non-default Docker Machine:

docker-share mount -m my-machine -tr . /home/docker/beep

Roadmap

  • Mount transient share
  • Mount permanent share (check state, stop VM if --force, edit boot script, restart)
  • Unmount

Usage

docker-share <command> [options]

Commands:
  mount    Create shared folder and mount it
  unmount  Unmount and remove shared folder if it exists

Global options:
  --machine, -m  Machine name (DOCKER_MACHINE_NAME or "default")  [string]
  --verbose      Verbose output                                  [boolean]

Run 'docker-share <command> --help' for more information on a command.

mount [local path] [guest path]

Creates a VirtualBox shared folder and mounts it inside the VM. Without arguments, the local and guest path default to the current working directory. A guest path like C:\project is converted to a cygwin-style /c/project.

Options:
  --name, -n       Shared folder name (basename of local path)  [string]
  --readonly, -r   Create read-only shared folder              [boolean]
  --transient, -t  Create temporary shared folder              [boolean]
  --help           Show help                                   [boolean]

Install

With npm do:

npm install docker-share --global

License

MIT © 2016-present Vincent Weevers

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].