47
You know who you are (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] Yoz@lemmy.world 1 points 2 years ago

Can someone please explain me like i am 5 what is docker and containers ? How it works? Can i run anything on it ? Is it like virtualbox ?

[-] SantaClaus@aussie.zone 1 points 2 years ago* (last edited 2 years ago)

Think of a container like a self contained box that can be configured to contain everything a program may need to run.

You can give the box to someone else, and they can use it on their computer without any issues.

So I could build a container that contains my program that hosts cat pictures and give it to you. As long as you have docker installed you can run a command "docker run container X" and it'll run.

[-] Lmaydev@programming.dev 1 points 8 months ago

A container is a binary blob that contains everything your application needs to run. All files, dependencies, other applications etc.

Unlike a VM which abstracts the whole OS a container abstracts only your app.

It uses path manipulation and namespaces to isolate your application so it can't access anything outside of itself.

So essentially you have one copy of an OS rather than running multiple OS's.

It uses way less resources than a VM.

As everything is contained in the image if it works on your machine it should work the same on any. Obviously networking and things like that can break it.

this post was submitted on 03 Jul 2023
47 points (100.0% liked)

Programmer Humor

19821 readers
535 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS