brikis98 / docker-osx-dev

A productive development environment with Docker on OS X
http://www.ybrikman.com/writing/2015/05/19/docker-osx-dev/
MIT License
1.43k stars 106 forks source link

Finding this project pretty hopeless #163

Open assembledadam opened 8 years ago

assembledadam commented 8 years ago

Like it seems many others, I came here because Virtualbox directory sharing is rubbish.

This has fixed the speed issue of volume sharing, but it appears at the expense of introducing some other pains:

/Moan. Been at this for several hours now. Boot2Docker doesn't appear to work with NFS (permission denied despite the OSX share working for Ubuntu). Going to try to get https://github.com/codekitchen/dinghy working.

brikis98 commented 8 years ago

Thanks for giving the project a try. Some responses/questions/comments on the points you brought up:

assembledadam commented 8 years ago

Sorry I was a little moany, attempting to solve a comparatively trivial issue in the big picture grates on you after hours!

Ended up getting Dinghy working relatively quickly last night, and it seems for my use case it works well. I think since you tried it they have got rid of the need for a vagrant layer so it's much simpler - may be worth giving it a go.

Completely uncached/unoptimised my app booted in between 700-900ms with Virtualbox shared folders, with local files (via docker-osx-dev) this brought it down to 250-350ms, and with dinghy it's sitting at ~290ms without any of the other troubles, and seemingly almost instant file updates. Satisfied for now!

thalesfsp commented 8 years ago

@assembledadam I commented the same thing. Here, we are using NodeJS, as you can imagine, a big project have a lot of dependencies, so the node_modules/ folder have a lot of files. docker-osx-dev could be an excellent tool, but the initial rsync, and other points already pointed, make it hard to adopt. Thanks!

fyddaben commented 8 years ago

@thalesfsp I am a front-end engineer . and use gulp /yeoman. so this project helped me a lot about share problem.but more question occurs.such as sync problem ...

ain commented 8 years ago

Sync problem also has a different aspect: size. I've got a project with 13 GB of assets that are used at runtime, meaning, despite the nice and fast sync, Docker runs out of space in some 15s to minute, see #169 for a report.

otbe commented 8 years ago

I was just rebooting the VM. The /Users directory vanished after a reboot and required a full resync. FYI there are no shared folders on the VM.

Same here. Some clarification: docker was installed before I tried the first time docker-osx-dev. After a restart of the docker vm a docker-osx-dev call will ask you again to remove the shared "/Users" vboxsf folder. Or the other way around: after a reboot of your vm, your /Users folder is shared again and you could use it like before. This is very useful for me, because sometimes I have to use other images, where i want to mount a folder within my user folder. This folder should be synced both ways, without docker-osx-dev. Is this a bug? Any opinions?

@assembledadam Maybe you could try to containerize your build environment? We have developed a small facade project for some of our core build tools (gulp+addons) for web apps to share configs and custom plugins. This facade, lets call it "build-tool", was the only dependency of our web apps. So we could put it into a docker image and use it. Some advantages of this approach:

brikis98 commented 8 years ago

@otbe: Not sure I understand you correctly, but in general, if you start the VM yourself with default options (e.g., boot2docker start or docker-machine create --driver virtualbox default), it will enable vboxsf and mount your /Users folder. If you start the VM using docker-osx-dev (just running the script is enough), it'll start it for you and set the necessary flags to disable vboxsf so /Users is not mounted.

assembledadam commented 8 years ago

@otbe That's close to what I've done, got a really nice workflow sorted out. I use Dinghy to sort out my dev base, alongside docker-compose with my pre-baked images (+ using AWS for prod and some dev resources). Been up and running for a few weeks now.

otbe commented 8 years ago

@brikis98 Thats fine for me. So I could choose between the behaviors. Run vm via docker-machineor docker-osx-dev.

@assembledadam Nice to hear. We just start to use docker this way and you confirm me :+1: Will give Dinghy a try!