4 ms·
> I developed containers on windows and then I still had to debug the containers when deploying on Linux. I basically avoid Windows altogether when doing deve
by dimgl 4y ago
> I developed containers on windows and then I still had to debug the containers when deploying on Linux.
I basically avoid Windows altogether when doing development now. Unless it's for video game development, which even then I wish I didn't have to use Windows.
Dockers containers are standard for a reason. In fact I can't imagine not using Docker as a daily driver nowadays. Within seconds I can spin up a sterile container for my development environment. Or application. Or a data store. Or a queue. And it's all isolated and seamlessly communicates with each other. I'm now even compiling Unreal Engine servers on Windows and deploying them on Linux machines using Docker containers.
Are you using Docker Compose by the way?
- bombolo 4y agosterile… do you use dockerhub or create the base layer yourself?
- number6 4y agoI only create the baselayer on machines where I compile the kernel from source
- stingraycharles 4y agoProblem with Windows is that, if you're running Linux containers on them, it launches inside an embedded virtual machine (at least last I checked). This means that networking and storage suddenly has to go through another hop, making things that should be trivial extremely annoying. E.g. a service binding telling you "please connect to http://127.0.0.1:8088 http://127.0.0.1:8088" and for the love of god you don't know why it doesn't work, but it's because the container, while using --network=host, thinks you're on the same host, while that's actually the virtual machine which is almost entirely inaccessible to you. Windows + docker is a minefield.
- uranusjr 4y agoDocker (and all container solutions out there) runs the Linux container in a VM on _any_ non-Linux OS. This is a designed trade-off of using Linux virtualisation and not really Windows’s fault (nor macOS where I do a lot of development and has all the same problems).
- Gigachad 4y agoI haven't encountered this issue on docker for mac. I can access containers from my web browser just fine. Yes it runs in a VM but I guess the GUI tool handles everything for you.
- uranusjr 4y agoThere are indeed edge cases where the VM implementation detail leaks, which I assume is what parent was referring to. Typical port exposing just works out of the box on Windows as well.
- stingraycharles 4y agoI’m not saying it’s anyone’s fault, I’m just saying that the approach has very rough edges that are difficult to grasp for beginners. It’s one of the reasons Docker is not always a good choice for a development workflow.
- dmingod666 4y agoI'd prefer just go with hyperv at that point and build containers in a Linux environment.. IDEs can still access your VMs so you can have all the nice syntax highlighting etc from Windows but you are building inside Linux. You have really nice networking options on hyperv so you can even check how your app deploys in a distributed environment.