Does anyone use docker for full-fledged development on OSX? I am a Linux user and tried setting up a dev environment for my colleagues on OSX but file system I/O was extremely slow and completely unusable.
Docker as an Integrated Development Environment (2019)
21–30 of 93 posts
Re: Docker as an Integrated Development Environment (2019)
#22Can you run ansible or terraform inside a docker container? There are two parts of the dev environment - the programmer preferences and the project libraries and other infrastructure. What I would like is to have a way to compose those two and ideally something that would work the same way inside a docker container as in a full VM.
To provision stuff _inside_ your docker container from ansible I've found packer is the easiest way to do it: https://www.packer.io/docs/provisioners/ansible-local There was apparently a tool called ansible-bender that did something similar but was abandoned. Packer makes it easy to define a container that's provisioned with a local ansible playbook.
Ultimately though I think using ansible with containers is a code smell. If you provision in a container with ansible you have to pull in an entire Python install, and that blows up your container size fast. You can do multi-stage builds and carefully extract the stuff you need but it's a real pain. IMHO minimal shell scripts that run in very tightly defined and controlled environments of the dockerfile (i.e. they don't have to be super flexible or support any and every system, just this container) are the way to go.
Re: Docker as an Integrated Development Environment (2019)
#23Does anyone use docker for full-fledged development on OSX? I am a Linux user and tried setting up a dev environment for my colleagues on OSX but file system I/O was extremely slow and completely unusable.
Re: Docker as an Integrated Development Environment (2019)
#24Does anyone use docker for full-fledged development on OSX? I am a Linux user and tried setting up a dev environment for my colleagues on OSX but file system I/O was extremely slow and completely unusable.
1. Using a :delegated or :cached flag when using a bind mount can speed it up a bit
2. For folders that need a lot of RW, but don’t need to be shared with the host (think node_modules or sbt cache), I bind a docker volume managed by docker-compose. This makes it extremely fast. Here's an example: https://gist.github.com/kamac/3fbb0548339655d37f3d786de19ae6...
Re: Docker as an Integrated Development Environment (2019)
#25Does anyone use docker for full-fledged development on OSX? I am a Linux user and tried setting up a dev environment for my colleagues on OSX but file system I/O was extremely slow and completely unusable.
Re: Docker as an Integrated Development Environment (2019)
#26Does anyone use docker for full-fledged development on OSX? I am a Linux user and tried setting up a dev environment for my colleagues on OSX but file system I/O was extremely slow and completely unusable.
Re: Docker as an Integrated Development Environment (2019)
#27Nice, similar thing to what I do, a few more things: 1. If you want X11 (haven't figured out audio yet) "-e DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix:ro" 2. Firefox > --shm-size=2g and start with: firefox --no-remote 3. Entering container Just map a command to enter the container with the name as parameter / optional image type as second. That way you get a new fresh environment whenever you want Command would just s…
Re: Docker as an Integrated Development Environment (2019)
#28Re: Docker as an Integrated Development Environment (2019)
#29Nice, similar thing to what I do, a few more things: 1. If you want X11 (haven't figured out audio yet) "-e DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix:ro" 2. Firefox > --shm-size=2g and start with: firefox --no-remote 3. Entering container Just map a command to enter the container with the name as parameter / optional image type as second. That way you get a new fresh environment whenever you want Command would just s…
For audio, maybe you can use pavucontrol on your host to make pulseaudio accept network connections, and then use PULSE_SERVER=your_host_ip command_which_plays_audio in the docker container? (I haven't tried it).