Docker dev containers or ways to use docker without installing development tools on host machine

I've heard dev containers with vscode can make isolated dev environments but it's still a little new. I'm curious how to use docker (with compose as well) in order to make dev environments where I dont have to install various programming languages and their tools on my machine. Anyone have experience with this?
1 Reply
StfBauer
StfBauer5mo ago
Well basically a Docker container is nothing else like a tiny virtual machine that is running on your desktop. The come with a full OS and apps as you need them. I rewrite for example my wordpress blog currently with a docker container. You can use for example this one - https://hub.docker.com/r/bitnami/wordpress It is the same engine a bit small as you would get for example at Google Cloud or Amazon Lightsail. For coding I have mapped a local directory for my wordpress resources, which means I can build for example the SASS files locally but update automatically in the VM. Modify PHP files localy but those are already reflected as mapped folder in the Docker container. Normally the VM looses all there data on restart but you can even have the database files locally mapped into the VM. There are countless options that you can do using Docker Files. Since they do not come with any graphical user interface you cannot really install development tools to it. Ok - You can use VI or other Linux based shell editors. Never tried to run an linux x server on them and I guess it wouldn't even be possible or at least I haven't tried it - https://riptutorial.com/docker/example/21831/running-gui-apps-in-a-linux-container
Docker Tutorial => Running GUI apps in a Linux container
Learn Docker - Running GUI apps in a Linux container