What is docker
Docker is basically a software containerizing software. It is more like using a Virtual machine (VM), but with more advantages than using a VM.
Virtualization
Separate environments are needed to deploy and test applications, to avoid risks of damages and losses in a real environment.
Virtual machines or VMs introduced to avoid this problem. If something wrong happens in VM, just remove and create a new one
Docker vs VM
VM is just like running another machine (guest) on top of your machine (host). It simply denotes when you run a Ubuntu VM with NodeJS server on a Windows host machine, it totally costs resources like CPU, RAM, disk amount, which is needed to run two separate Windows and Ubuntu machines with its software.
(image credits: https://www.guru99.com/docker-tutorial.html)
In the same scenario above, when we are using docker, it needs only NodeJS image and a container (explained in a moment)
Glossary
Image - It is like a class in OOP. Basically defines the software attributes, resource levels permitted to use
Container - It is like an object in OOP. Container is an instance of Image. There can be multiple containers from same image. We interact with containers when executing docker
Registry - All the docker images are stored in docker registry. Docker users can get and push images to use in projects. Public and private registries are available to store images
Why Docker
Docker containers run on top of the host's Operation system.
Docker containers run in an isolated environment on top of the host's OS
Can run more containers on the same infrastructure than running more Virtual machines
Images, containers, Network interfaces are shareable
Only essential programs can be used in images, while removing unwanted programs
Easy to add and remove software from system
Disadvantages
Graphical Applications not work well
Containers are not speed as host machine installed applications
Some container products don't work with other ones
All of the data inside a container disappears forever when the container shuts down unless we use a persistent storage location
This website contains IT and Programming related material. Apart of that daily needed hacks are also included, which are intended for educational purposes only. If you found anything violating copyright of another party, please feel free to report site admin, with supporting material / copyright url.
Tuesday, April 7, 2020
Sunday, April 5, 2020
How to use 'Dialog 4G router' sim in mobile phone
If you are a user with a Dialog 4g router, worst problem is you need to carry the router and its adapter wherever you go and, finding a square ping socket to plug it. And during power failures this router cannot be operated unless you use a UPS.
Now you can avoid these problems if you have a mobile phone which is capable of accessing LTE networks. So the router's sim can be inserted to mobile phone and use its data connection in your phone or using the phone as a mobile hotspot with dialog 4G sim inserted.
For this demonstration I used a Xiaomi redmi note 8 phone. You can use any phone with following specifications.
- Supporting LTE networks. ( we want 2300 Mhz LTE band 40 )
- Supports to use only LTE network (access has to be restricted for 2G and 3G)
- Mini sim slot (I had to cut the existing sim as a nano sim to use with my phone)
This pic was taken after completing the tutorial.
Then,
"settings" ->
"SIM cards & Mobile networks" ->
"SIM1" or "SIM2" depending your sim slot ->
"Mobile networks"
Note: This path may be different depending your phone brand & OS
First try to use auto network connect with LTE only mode. It may correctly connect to Dialog 4G network.
If not try to connect to mobile network manually. This is the result list I got after selecting only LTE networks in my phone, and doing a network scan.
41311 is the MNC/MCC number for dialog 4G.
https://www.apnsettings.org/srilanka/mcc-mnc-code-for-sirlanka/
Wait even it connected to Dialog 4G mobile network, still you don't have internet access, obviously only Emergency calls are allowed.
You need to set APN settings as following.
Name: any_name;
APN: <empty>
But your phone won't allow to save an empty apn. So you need to type a 'space' in APN field and save it.
Now it establishes a data connection.
Now you can see you are connected to 4G data network. Anyway you cannot use voice and sms using this 4G sim. If you have a dual sim phone, you can use the other sim slot for voice and sms.
Subscribe to:
Posts (Atom)