1-i’ve tested virtualbox before where i was able to install apps, then shutdown the virtual machine, then restart it and find my installed apps, system configurations, projects, etc. my question: how to do that in containers? i have an ubuntu container, each time I install an app (e.g apt install vim) and restart the container I loose the app (i.e. vim)? I know I can clone container into images, but is this the right way?
2-i am using ubuntue, can I run the docker-engine without running docker-desktop?
You might want to google about the difference of vm’s and containers. There are hundreds, if not thousands of blog post about it.
In short: a vm emulates hardware and runs a full OS, a container on the other hand consist of an application and it’s dependencies, it just runs an isolates process (+ some network and storage magic) and is supposed to ephemeral/disposable.
If you want applications/tools to exist in a container → create a Dockerfile that automates the installation and build an image from it, then use this image to create the container from it. If you want to persist data outside a container → mount volumes into the container folders that store persistant data inside the container.