Connecting applications in multiple dockers

I need to run multiple programs in a container but I know this isn’t what you should do. I have a build environment that I’d like to get out of VMs and into containers, but each VM requires multiple programs like a version of Java, a build agent/server program, perforce, and other programs. Is there a way to create an environment with dockers so that I Can have all of those programs interact?

I think the important thing to understand is that a container is quite different to a VM. While a container is based on some operating system, typically Linux, it’s still not the same as a VM. Technically it is possible to start multiple processes within a single container. However, a better option to describe a docker container is it being a runtime for a single process.

Based on the information provided, your options also depend on what programs your want to execute. If these are you own programs you may need to revisit or even significantly change them to make best use of a container. If the program is an off-the-shelf program that you install on your VM using some sort of an installer, you may be out of luck. For example if your VM is a Windows machine then the windows installer is unlikely to run in the container.

I think it’d be best to read up on Docker concepts, ideally even experiment with a few examples yourself to get a feel what Docker is about. It may be suitable for some aspect of what you are trying to achieve. However, it’s certainly not a drop-in replacement for VMs.