-1

I haven't really understood what is docker container, how if I like to develop my own container like docker container?

Q: Is docker container a small Linux operating system that host another Linux operating system called imagine?

I am trying to understand what are actually docker containers in respect to understand Kubernetes objects such as pod, service, deployment, ingress and etc. Are all these small Linux operating systems with applications to perform different tasks?

Secondly, is there source code of docker container available somewhere so I could look into it in order to understand how was this build?

Some technical description would ba appreciated. Thank you

Farooq
  • 1
  • 1
  • This is all covered in Docker's documentation. What part of it didn't you understand? – Stephen Newell Dec 10 '22 at 14:45
  • If you want to build your own image, the tutorials on https://docs.docker.com are probably a good place to start. Remember that a container is a somewhat isolated and temporary environment – it's not intended to access host files, and any changes you make in the container filesystem will be lost on exit – but some things like the kernel are shared between containers and this limits what you can do. – David Maze Dec 10 '22 at 16:21

1 Answers1

0

I believe docker uses runC for spawning containers according to OCI specs- and instead of using a different OS, it uses the host's operating system. How I think about it is- while VMs have stronger isolation - and don't share resources, (hence consume more memory), Docker images can share the same kernel and share resources, so it's going to be lightweight.