• 𝐘Ⓞz҉@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    1 year 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 ?

    • Spzi@lemm.ee
      link
      fedilink
      English
      arrow-up
      14
      ·
      1 year ago

      Is it like virtualbox ?

      VirtualBox: A virtual machine created with VirtualBox contains simulated hardware, an installed OS, and installed applications. If you want multiple VMs, you need to simulate all of that for each.

      Docker containers virtualize the application, but use their host’s hardware and kernel without simulating it. This makes containers smaller and lighter.

      VMs are good if you care about the hardware and the OS, for example to create different testing environments. Containers are good if you want to run many in parallel, for example to provide services on a server. Because they are lightweight, it’s also easy to share containers. You can choose from a wide range of preconfigured containers, and directly use them or customize them to your liking.

    • Lmaydev@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      7 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.