re: Explain Docker Like I'm Five VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

Got it!

Could I make a parallel to Python virtual environments, with a requirements.txt file? I understand that Docker is more encompassing, while Python virtualenvs are Python-only, but it is the same base idea, right?

D.

 

I haven't done much Python but from what i understand that means when you cd into the directory it sets up the env vars for you?

If yeah, kinda?

As always, the best thing to do is try it yourself.

Get docker installed and then set up a docker-compose file with a DB configured in it. Do docker-compose up, smile. Then add another db to the file and then pick your jaw up from the floor when you realise how easy it all is.

 

There are some parallels in concept maybe? The key difference is while Python Virtual Environments isolate which Python interpreter, environment, and paths you use, its still apart of the host system.

Docker images are only reliant upon the host kernel and run isolated from the system like a sandbox.

Example: Wanna test what a particular command or python script will do to a system without affecting the actual host? Run it inside a docker container.

code of conduct - report abuse