Hi, I am a blockchain developer and working with hyperledger fabric.
I am using ubuntu as my OS
I am faced an issue that my OS crashed and then I had to all the configurations like install this software with this command or that…
And let me be honest with you.
It sucks!!
What I am looking is towards any tutorial/solution so whenever I move to a new PC and install an OS I also get the complete setup with running a single docker file.
Can someone point me towards that ?
I am repeating again : I need to make a docker file so whenever I install a new OS I simply run that command and my every software is configured well.
to run a container that provisions a bare metal machine or a vm using a configuration management tool like ansible, puppet or chef?
to create an image with your development tools and use it as development container, and then build images of your application that allows to run your application in containers?
I am sure from your point of view your first post and your last post describe very clearly what you try to achieve. Well for me, it is not clear enough. That’s why I asked the questions in the first place. It doesn’t really help to get a better understanding of what you try to achieve exactly if you ignore my questions and just repeat yourself.
How do you think can docker support your use case, and what do you think should be the role of docker in the final solution?
Do you actually know what Docker is for? I think @meyay doesn’t understand what you want to do, because you decided to use Docker, but you still don’t understand what Docker is so you can’t ask your question properly.
If you want to create a single Dockerfile which would contain everything that your phisycal or virtual server contains, that is not what Docker is for and it would not make sense. On the other hand:
Using (for example) Ansible could help you to define every installable software in yaml files so when you go to a new server or you need to reinstall the operating system, you can run the “playbooks” again and have everything configured again. It is not that simple of course, but these tools are what you are looking for and not Docker.
Docker would help you if you wanted to run different containers for each of your websites, but it is definitely not for running a full operating system in a container.
When you need the ‘entire’ OS, a virtual machine is more appropriate. When you only need ‘application’ scope, a container, i.e. docker image is more appropriate. A python environment is a type of application isolation or virtualization. Where the OS is OS isolation or virtualization.
Bare Metal->OS->Hypervisor->VM->OS
(This is OS isolation)
Versus
Bare Metal->OS->Framework->Image->Container
(This is application isolation)
Within the given VM, you can do deployment via SaltStack, Ansible, etc. to ensure consistent configuration of your environment.
I have done the same just by installing everything in the VM via the typical methods, I just copy the entire VM, since I have it complete. And duplicate the VM as needed for each project. If I need to roll back I restore from the latest applicable VM backup. I find this easier, using the entire VM, for what you explain as your need. This is not a dig against containers or docker, just that a VM seems based on what you note, as the better fit.
Of course you can also have docker in a VM in a hypervisor, but that is story for another day.
Probably installing everything using the package manager of the OS as you would do manually, but also using Ansible or the other mentioned tools to automate it. By the way if you have something like Ansible and you can use it to install everything, you don’t even have to copy a VM, just use the same playbook yaml file (or any configuration needed in case of the chosen tool) and run it on the new VM. It’s like a Dockerfile but mainly for physical and virtual machines, not containers and it doesn’t create an image just manages running machines.
I should also mention that although Docker is for application containers, there are “system containers” as well. Which means you have an entire OS in the container, including systemd. You use LXD or Incus to run system containers, but I have never created a system container image.