If you’re in the cloud or datacenter space, chances are you’ve been hearing about the term “containers” and “Docker” non-stop for the past few years. Ever stop and wonder what this is all about?
The purpose of this tutorial is to get your feet wet with Docker and to standardize your understanding of how Docker and Containers work.
Getting Started with Docker
Getting Docker to work on your server is quite simple. Available packages are in both deb and rpm and in many distributions it comes already in official repository and needs to be simply installed. Once you have Docker successfully installed on your system, test it with running a hello world command:
$ docker run hello-world
Unable to find image ‘hello-world:latest’ locally
latest: Pulling from library/hello-world
03f4658f8b78: Pull complete
a3ed95caeb02: Pull complete
Status: Downloaded newer image for hello-world:latest
Hello from Docker.
This message shows that your installation appears to be working correctly.
After a successful installation, it is time to get our hands dirty. It is time to run our first container, but what is a container? And what’s so different compared to a virtual machine?
Linux containers contain applications or programs in a way that keep them isolated from the host system that they run on. Containers behave like its own machine – to the outside eye, they look like its own independent server. However, here’s where the difference comes into play: unlike a virtual machine, rather than creating and running an entire operating system within the virtualized instance, containers don’t need to replicate an entire operating system, only the individual components they need in order to operate. As you can imagine, this means less overhead, less space, and increased performance. To put this into perspective, with an ideal container set up, you can have as much as 4 to 6 times the number of server application instances as you can compared to running Xen or KVM VMs on the same hardware. You get a lot more application bang for your server buck.
Running container with Docker
Alright. So now, we have Docker installed, and we understand what containers are…
It’s now time to run our first container with Docker! For our first container we will run Ubuntu. So we will put this from the repository:
$ docker pull ubuntu
If you get a permission error, don’t forget to use sudo. The pull command will fetch the Ubuntu image from Docker’s official repository servers.
Once done, we can deploy a container with this OS.
$ docker run -i -t ubuntu /bin/bash
To run image we will use the command run. Type in terminal
$ docker run ubuntu ls -l
We can verify the container was successfully installed:
$ docker run ubuntu ls -l
drwxr-xr-x 2 root root 4096 Mar 2 16:20 bin
drwxr-xr-x 5 root root 360 Mar 18 09:47 dev
drwxr-xr-x 13 root root 4096 Mar 18 09:47 etc
drwxr-xr-x 2 root root 4096 Mar 2 16:20 home
drwxr-xr-x 5 root root 4096 Mar 2 16:20 lib
The ls -l part enabled us to see the listing from Docker.
There you have it! Docker is successfully installed on your server, and you have successfully created your first container. The possibilities are endless from here.
Docker and containers are a great tool for developers and webmasters! With Docker you can test your applications, visualize your platform, and increase productivity.
Special thanks to Nathan from NFP Hosting for sponsoring this tutorial.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!