Jump to content

Can I make you own OS?? What is Docker?? What are its usage?? Can I use it to make my own OS???

Can I make you own OS?? What is Docker?? What are its usage?? Can I use it to make my own OS???

Thanks

Link to comment
Share on other sites

Link to post
Share on other sites

You can make your own OS, but if you are capable of making one that works, you wont be asking a question like this.

 

Docker is used to set up virtual machines in Linux. Each of these virtual machines will run as if they are independent from each other, but you still need a Linux environment to use it.

 

These virtual machines still run Linux, so you cant use it to make a new OS

CPU: i7-2600K 4751MHz 1.44V (software) --> 1.47V at the back of the socket Motherboard: Asrock Z77 Extreme4 (BCLK: 103.3MHz) CPU Cooler: Noctua NH-D15 RAM: Adata XPG 2x8GB DDR3 (XMP: 2133MHz 10-11-11-30 CR2, custom: 2203MHz 10-11-10-26 CR1 tRFC:230 tREFI:14000) GPU: Asus GTX 1070 Dual (Super Jetstream vbios, +70(2025-2088MHz)/+400(8.8Gbps)) SSD: Samsung 840 Pro 256GB (main boot drive), Transcend SSD370 128GB PSU: Seasonic X-660 80+ Gold Case: Antec P110 Silent, 5 intakes 1 exhaust Monitor: AOC G2460PF 1080p 144Hz (150Hz max w/ DP, 121Hz max w/ HDMI) TN panel Keyboard: Logitech G610 Orion (Cherry MX Blue) with SteelSeries Apex M260 keycaps Mouse: BenQ Zowie FK1

 

Model: HP Omen 17 17-an110ca CPU: i7-8750H (0.125V core & cache, 50mV SA undervolt) GPU: GTX 1060 6GB Mobile (+80/+450, 1650MHz~1750MHz 0.78V~0.85V) RAM: 8+8GB DDR4-2400 18-17-17-39 2T Storage: HP EX920 1TB PCIe x4 M.2 SSD + Crucial MX500 1TB 2.5" SATA SSD, 128GB Toshiba PCIe x2 M.2 SSD (KBG30ZMV128G) gone cooking externally, 1TB Seagate 7200RPM 2.5" HDD (ST1000LM049-2GH172) left outside Monitor: 1080p 126Hz IPS G-sync

 

Desktop benching:

Cinebench R15 Single thread:168 Multi-thread: 833 

SuperPi (v1.5 from Techpowerup, PI value output) 16K: 0.100s 1M: 8.255s 32M: 7m 45.93s

Link to comment
Share on other sites

Link to post
Share on other sites

Docker is a way to run an application in a container. Meaning the application will run seperate to anything else on the system (unless you want it to) It only has access to whatever is nesseary for it to run. It's an alternative to run a number of virtual machines with a single purpose.

 

Could it be used to make you own os? No.

Can you make your own OS? probably yes. Though it's more likely you would modify an existing OS.

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, Name Taken said:

Docker runs containers not virtual machines. The container can be any Linux distro's userland that talks to the host kernel without an abstraction layer.

Partially true. If you are not running a Linux host (macOS or Windows, for example), Docker will set up a Linux virtual machine because it needs a Linux kernel to run containers. 

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

28 minutes ago, jj9987 said:

Partially true. If you are not running a Linux host (macOS or Windows, for example), Docker will set up a Linux virtual machine because it needs a Linux kernel to run containers. 

docker windows container run on windows server they need no Linux kernel.

 

containers are vastly different VM's this is important because you cant simply run any *nix  container under any distro/kernel, there are some limitations.

 

the easiest way to think about containers is packages. a container is a package that contains everything you need to a run an application (if the application is more complex and needs more things like a DB them multiple containers work together, application + db for example) this separation makes it easy to distribute applications that will require otherwise to install a plethora of requirements on a system.

Link to comment
Share on other sites

Link to post
Share on other sites

If you're interested in making your own OS, you could look into Linux from Scratch to even begin on making your own OS which would be pretty educational: http://www.linuxfromscratch.org/lfs/view/stable/

 

As for Docker, it's basically a container to compartmentalize a software apart from the rest of the system. (Though you could compartmentalize a software by using SELinux with well configured Mandatory Access Control Policy.) As for using it for making your own operating system, no, you'll have to run docker and Kernel is basically handling that.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Name Taken said:

Docker itself does not setup any virtual machines. You are thinking of Docker Machine.

 

https://docs.docker.com/machine/overview/

No, I am talking about the Docker Engine itself.

Docker needs a Linux kernel to run Linux containers (thanks for the note @lacion, forgot the windows part). Therefor it sets up a virtual machine using Hyper-V to have a Linux kernel that can be used as host for the containers. Using Hyper-V gives much better performance than using VirtualBox, for example. This is why Docker for Windows requires you to have Hyper-V installed and available (hence no support for Windows 10 Home because Hyper-V is not available there).

 

Windows containers do not create a virtual machine indeed, although these do not seem to be that widely used yet. They use Windows kernel and do not require a Linux VM/kernel.

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Name Taken said:

I have Docker running on my Linux home server and these are the command line options:

 



Usage:	docker COMMAND

A self-sufficient runtime for containers

Options:
      --config string      Location of client config files (default "/home/owner/.docker")
  -D, --debug              Enable debug mode
      --help               Print usage
  -H, --host list          Daemon socket(s) to connect to
  -l, --log-level string   Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/home/owner/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/home/owner/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/home/owner/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote
  -v, --version            Print version information and quit

Management Commands:
  config      Manage Docker configs
  container   Manage containers
  image       Manage images
  network     Manage networks
  node        Manage Swarm nodes
  plugin      Manage plugins
  secret      Manage Docker secrets
  service     Manage services
  stack       Manage Docker stacks
  swarm       Manage Swarm
  system      Manage Docker
  trust       Manage trust on Docker images (experimental)
  volume      Manage volumes

Commands:
  attach      Attach local standard input, output, and error streams to a running container
  build       Build an image from a Dockerfile
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  diff        Inspect changes to files or directories on a container's filesystem
  events      Get real time events from the server
  exec        Run a command in a running container
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  images      List images
  import      Import the contents from a tarball to create a filesystem image
  info        Display system-wide information
  inspect     Return low-level information on Docker objects
  kill        Kill one or more running containers
  load        Load an image from a tar archive or STDIN
  login       Log in to a Docker registry
  logout      Log out from a Docker registry
  logs        Fetch the logs of a container
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  ps          List containers
  pull        Pull an image or a repository from a registry
  push        Push an image or a repository to a registry
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images
  run         Run a command in a new container
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  search      Search the Docker Hub for images
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  version     Show the Docker version information
  wait        Block until one or more containers stop, then print their exit codes

Run 'docker COMMAND --help' for more information on a command.

Which one these commands sets up a virtual machine? If I want to create a local VM to run Docker containers in I would run

 


$ docker-machine create --driver virtualbox dev
$ eval "$(docker-machine env dev)"
$ docker run ...

 

As I said before, Docker does not use one on Linux because it already has access to a Linux kernel.

The virtual machine is setup during installation only on non-Linux platforms, because it has no Linux kernel there to run Linux containers.

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Name Taken said:

I'm referring to Docker as just the core Linux runtime daemon, not all the other stuff built around it like for setting up VMs.

Docket for windows is just a simplification from docker + docker machine but it’s he same context on windows it uses hyper v and on OS X it uses the native virtualization system but it’s basically the same thing as when we had to use virtual box, that is done becouse in order to run Linux containers you need a Linux host so they can use the kernel.

 

docker itself (or moby how is called now) it’s written in golang and has no ties to *nix or the *nix kernels 

Link to comment
Share on other sites

Link to post
Share on other sites

what do you mean your own OS? Are you going to write your own kernel from scratch? 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×