Showing posts with label docker. Show all posts
Showing posts with label docker. Show all posts

Friday, August 31, 2018

How TO Install Docker On Ubuntu 18.04/16.04

How To Install Docker In Ubuntu Linux 14.04, 16.04 And 18.04



I'm going to show you how to install and run Docker in Ubuntu Linux

First update source-list

sudo apt update

Install required dependencies..

sudo apt install apt-transport-https ca-certificates curl software-properties-common

Then.. Add docker's official GPG key with following command..

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

The above commands output will looks like..

shivaraj@shivaraj-Aspire-A315-21:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - OK shivaraj@shivaraj-Aspire-A315-21:~$

Now add Docker Community Edition's repository to list..

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
shivaraj@shivaraj-Aspire-A315-21:~$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease Ign:3 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease Get:4 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB] Hit:5 http://dl.google.com/linux/chrome/deb stable Release Hit:6 http://in.archive.ubuntu.com/ubuntu bionic InRelease Hit:7 https://deb.opera.com/opera-stable stable InRelease Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB] Get:9 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Hit:10 http://archive.canonical.com/ubuntu bionic InRelease Hit:11 http://linux.teamviewer.com/deb stable InRelease Hit:12 http://linux.teamviewer.com/deb preview InRelease Hit:13 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release Hit:15 https://repo.skype.com/deb stable InRelease Get:16 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:17 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [1,708 B] Hit:18 https://download.sublimetext.com apt/stable/ InRelease Fetched 313 kB in 2s (128 kB/s) Reading package lists... Done shivaraj@shivaraj-Aspire-A315-21:~$

Now update the package index once again..

sudo apt update

Now Install the docker..

sudo apt install docker-ce
shivaraj@shivaraj-Aspire-A315-21:~$ sudo apt install docker-ce Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: aufs-tools cgroupfs-mount pigz The following NEW packages will be installed: aufs-tools cgroupfs-mount docker-ce pigz 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 40.4 MB of archives. After this operation, 198 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce amd64 18.06.1~ce~3-0~ubuntu [40.2 MB] Get:2 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 pigz amd64 2.4-1 [57.4 kB] Get:3 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 aufs-tools amd64 1:4.9+20170918-1ubuntu1 [104 kB] Get:4 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 cgroupfs-mount all 1.4 [6,320 B] Fetched 40.4 MB in 12s (3,510 kB/s) Selecting previously unselected package pigz. (Reading database ... 273749 files and directories currently installed.) Preparing to unpack .../archives/pigz_2.4-1_amd64.deb ... Unpacking pigz (2.4-1) ... Selecting previously unselected package aufs-tools. Preparing to unpack .../aufs-tools_1%3a4.9+20170918-1ubuntu1_amd64.deb ... Unpacking aufs-tools (1:4.9+20170918-1ubuntu1) ... Selecting previously unselected package cgroupfs-mount. Preparing to unpack .../cgroupfs-mount_1.4_all.deb ... Unpacking cgroupfs-mount (1.4) ... Selecting previously unselected package docker-ce. Preparing to unpack .../docker-ce_18.06.1~ce~3-0~ubuntu_amd64.deb ... Unpacking docker-ce (18.06.1~ce~3-0~ubuntu) ... Setting up aufs-tools (1:4.9+20170918-1ubuntu1) ... Setting up docker-ce (18.06.1~ce~3-0~ubuntu) ... Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service. Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket. Processing triggers for ureadahead (0.100.0-20) ... ureadahead will be reprofiled on next reboot Setting up cgroupfs-mount (1.4) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for systemd (237-3ubuntu10.3) ... Processing triggers for man-db (2.8.3-2) ... Setting up pigz (2.4-1) ... Processing triggers for ureadahead (0.100.0-20) ... shivaraj@shivaraj-Aspire-A315-21:~$

The Docker daemon starts automatically.

Verify the installation.. with the following command...

sudo docker run hello-world
shivaraj@shivaraj-Aspire-A315-21:~$ sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 9db2ca6ccae0: Pull complete Digest: sha256:4b8ff392a12ed9ea17784bd3c9a8b1fa3299cac44aca35a85c90c5e3c7afacdc Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/engine/userguide/ shivaraj@shivaraj-Aspire-A315-21:~$

Here is the video version of above tutorial..

That's it for now.. If you like.. don't forget to share it guys.. You can follow us on fb.com/opensourceinside and also subscribe our channel on Youtube..


Wednesday, April 13, 2016

5 reasons to use Docker for productivity software installation

5 reasons to use Docker for productivity software installation

WhenDocker brought new life to Linux containers at the beginning of 2013, the technology quickly gained popularity among software developers. Today Docker has millions of container downloads, thousands of community contributors, and countless third party projects who are using it. What explains this extraordinary popularity?

There are many articles out there trying to answer that question, describing the Docker features and benefits, mostly for developers. But when it comes to ordinary users and even system administrators, we still have some questions. In this article, I try to sum up the main advantages of using Docker for people, like me, who are looking for ways to use Docker with a project management tool. I specialize in productivity software and receive a lot of questions about software installation, which can be simplified with Docker.

I'll focus on...

  • OnlyOffice, an all-in-one solution for businesses that offers a set of tools for project management, including Gantt Charts, as well as integration with CRM, email, document management tools with online editors, calendars, etc. It has a public automated Docker repository with more than 10,000 pulls.
  • OpenProject, a project management tool with a wide range of features and plugins. There are 19 different Docker repositories for OpenProject, the most popular one with more than 10,000 pulls.
  • Redmine, a popular project management and issue tracking web application. There are over 180 different Redmine repositories in Docker Hub. The most popular ones are the official repository, with over 100,000 pulls, and the repository owned by sameersbn, which has a similar number.

#1. Save time

Project management tools are intended to carry a project through all its stages, and help users quickly and efficiently achieve their goals. Thus, the installation should be quick and easy. But sometimes, going through all of the installation steps might take a few hours even if we use the packages instead of compiling the source code. The main reason for this is that these tools require some additional components to be installed on the machine, and managing different versions can be tedious.

To work correctly, OnlyOffice requires Mono 3.2 or later, MySQL 5.6 or later, and nginx. OpenProject's list of dependencies is: Ruby 2.1, Apache or nginx, Phusion Passenger or Unicorn as an application server, MySQL 5.6, or later or PostgreSQL 9.1 or later as a database. To deploy and run Redmine, we need to install at least Ruby for a given Redmine version, one of the supported database back-ends (MySQL, PostgreSQL, Microsoft SQL Server, SQLite 3) to store data, and Bundler to manage gems dependencies.

These dependencies also have a lot of dependencies themselves.

When we use the Docker image, the only dependency to be installed is Docker itself. Then, all we need is to execute one single command to deploy the selected project management tool with all the necessary dependencies.

#2. Avoid dependency errors

As additional components are required, more issues might occur when installing and configuring them. Docker reduces the number of dependencies and thus the number of errors that might occur especially for ordinary users.

#3. Save resources

To ensure the proper project management tool works, our machine must meet all the system requirements specified by developers. But the reality is that the settings and environment of our machine could differ from those of the machine used by developers for writing and testing the code. Of course, we can use an "empty" machine (or two machines in the case of OnlyOffice, if we plan to use the online document editors as well) and try to reproduce the environment. Regardless of the time spent, we would not be able to install anything else on this machine. Or, you may find that you need to hire a system administrator or a developer to reproduce the necessary environment.

Docker allows us to minimize these costs by providing a way to run an application securely isolated in a container allowing us to run many containers simultaneously on one machine.

#4. Update faster and easier

Data security is one of the main reasons why people prefer open source and server solutions to cloud-based solutions. And, the updating process itself takes even more time than the software installation.

With Docker, the updating process becomes much easier. We can store data on the host machine (mount the data volumes by specifying the -v option in the Docker run command) and back it up with any software available for such purposes. Then, all we need is to remove the current container, remove the current image, and run the new image with the same map paths. In sum, three commands to update the whole project management system.

#5. Keep the machine in order

Choosing the right project management tool(s) might take some time. Most of them offer a cloud version to try, like OnlyOffice and OpenProject.

Docker allows us to test the toolset on our local machine and evaluate its capacities without blocking up the system. We won't need to search for the dependencies and uninstall them one by one, you can uninstall an inappropriate tool with one single command.


Creative Commons License
Source : opensource.com

What is Docker ? (An Introduction To Docker)

What is Docker ?
An Introduction To Docker



What is Docker ?

Docker is all about making it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.

In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they're running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.

And importantly, Docker is open source. This means that anyone can contribute to Docker and extend it to meet their own needs if they need additional features that aren't available out of the box.

Who is Docker for ?

Docker is a tool that is designed to benefit both developers and system administrators, making it a part of many DevOps (developers + operations) toolchains. For developers, it means that they can focus on writing code without worrying about the system that it will ultimately be running on. It also allows them to get a head start by using one of thousands of programs already designed to run in a Docker container as a part of their application. For operations staff, Docker gives flexibility and potentially reduces the number of systems needed because of its small footprint and lower overhead.

Getting started

Here are some resources that will help you get started using Docker in your workflow. Docker provides a web-based tutorial with a command-line simulator that you can try out basic Docker commands with and begin to understand how it works. There is also a beginners guide to Docker that introduces you to some basic commands and container terminology. Or watch the video below for a more in-depth look:



Docker and security

Docker brings security to applications running in a shared environment, but containers by themselves are not an alternative to taking proper security measures.

Dan Walsh, a computer security leader best known for his work on SELinux, gives his perspective on the importance of making sure Docker containers are secure. He also provides a detailed breakdown of security features currently within Docker, and how they function.


Creative Commons License
Source : opensource.com