docker / kitematic

Visual Docker Container Management on Mac & Windows
https://kitematic.com
Apache License 2.0
12.23k stars 1.41k forks source link

Ability to mount devices #764

Open AutomationD opened 9 years ago

AutomationD commented 9 years ago

I would like to request ability to mount devices, specifically USB: via --device parameter.

TeckniX commented 9 years ago

@kireevco Unless you're on a Linux type system, this is going to require more than a Kitematic change, as the VM running the linux environment will need to mount said device before it can be used in a container. Do you have a specific use-case?

AutomationD commented 9 years ago

@TeckniX my issue started here I need to pass a usb device from my kitematic docker vm to a docker container. And it works fine on Windows/Mac as well right now, I just need ability to pass this via Kitematic. I wish there would be a way to use some special environmental variable that I will define in my Dockerfile that Kitematic will pick up.

My usecase is here github.com/kireevco/sming-docker

TeckniX commented 9 years ago

Sent it to you on Gitter, but take a look at: https://github.com/TeckniX/kitematic/tree/device-support

Couldn't do much QA for lack of similar setup, but the 'Advance' tab should show the proper device path for containers that were started with the --device option. Make sure to use it on a container which can be destroyed. (aka don't point fingers if it doesn't work ) )

alon24 commented 9 years ago

+

TeckniX commented 9 years ago

@alon24 Did you give my github repo a try?

AutomationD commented 9 years ago

Sorry, I'm really backed on time. I will try soon! appreciate your help very much!

Sent from my iPhone

On Jul 7, 2015, at 10:01 AM, TeckniX notifications@github.com wrote:

@alon24 Did you give my github repo a try?

— Reply to this email directly or view it on GitHub.

MrZANE42 commented 9 years ago

As a sming user I would also very much appreciate this. Simplifies usage.

AutomationD commented 9 years ago

MacOS: no Advanced tab.

Also apparently can't find gruntfile:

grunt
A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.
 ✘  ~/dev/kitematic   master  npm start

> Kitematic@0.6.6 start /Users/dmitry/dev/kitematic
> gulp

[09:17:55] Using gulpfile ~/dev/kitematic/gulpfile.js
[09:17:55] Starting 'download-docker'...
[09:17:55] Starting 'download-docker-machine'...
[09:17:55] Starting 'download-docker-compose'...
[09:17:55] Starting 'download-boot2docker-iso'...
[09:17:55] Downloading Boot2Docker iso
[09:17:55] Starting 'download'...
[09:17:55] Starting 'copy'...
[09:17:55] Finished 'copy' after 6.02 ms
[09:17:55] Starting 'js'...
[09:17:55] Starting 'images'...
[09:17:55] Starting 'styles'...
[09:17:55] Downloading Docker Compose
[09:17:55] Downloading Docker Machine
[09:17:55] Downloading Docker
[09:17:58] Finished 'styles' after 3.11 s
[09:18:00] Finished 'js' after 5.37 s
[09:18:00] Finished 'images' after 5.38 s
[09:18:01] gulp-download-electron Downloading electron v0.27.2.
downloading [                   ] 1% 108.9s[09:18:03] Finished 'download-docker-compose' after 7.69 s
downloading [=====              ] 30% 13.9s[09:18:07] Finished 'download-docker-machine' after 12 s
downloading [===========        ] 58% 6.0s[09:18:10] Finished 'download-docker' after 15 s
downloading [===========        ] 61% 5.6s[09:18:10] Finished 'download-boot2docker-iso' after 15 s
downloading [===================] 100% 0.0s
[09:18:15] gulp-download-electron Unzipping electron.
[09:18:16] Finished 'download' after 21 s
[09:18:16] Starting 'default'...
[09:18:16] Finished 'default' after 254 ms
[91904:0709/091816:INFO:renderer_main.cc(200)] Renderer process started
[91902:0709/091816:INFO:CONSOLE(109)] "Download the React DevTools for a better development experience: https://fb.me/react-devtools", source: /Users/dmitry/dev/kitematic/node_modules/react/lib/React.js (109)
[91902:0709/091846:INFO:CONSOLE(70)] "192.168.99.100", source: /Users/dmitry/dev/kitematic/build/utils/DockerUtil.js (70)
[91902:0709/091855:INFO:CONSOLE(48)] "Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of ContainerSettingsVolumes. See https://fb.me/react-warning-keys for more information.", source: /Users/dmitry/dev/kitematic/node_modules/react/lib/warning.js (48)
[92739:0709/092553:INFO:renderer_main.cc(200)] Renderer process started
TeckniX commented 9 years ago

Can you issue the following in the same directory: git branch and git remote

AutomationD commented 9 years ago

I apologize, I didn't switch the branch. Testing.

TeckniX commented 9 years ago

FYI: As mentioned in chat, if you don't specify the 'device' path it will destroy your container, as it'll fail to rebuild it. Similarly if the path you've defined fails, it will not create the container - I have zero error checking in place.