Install portainer on ubuntu 16 docker

Step 1 – Install Docker on Ubuntu 16.04 LTS
Before installing docker packages, please update the repository on your system and upgrade packages.

sudo apt update
sudo apt upgrade

Now install docker using the apt command below.

sudo apt install -y

After the installation is complete, start docker service and enable it to launch everytime at system boot.

systemctl start docker
systemctl enable docker

Docker installed on ubuntu 16.04 server, check it using the command below.

docker version

And you will get the docker version 1.x installed on the system.

Step 2 – Install and Configure Portainer
Portainer can be installed as a docker container and standalone without docker container. Continue reading “Install portainer on ubuntu 16 docker” »


Sharing Volumes Between Containers

There are many situations where it is useful to share a Docker volume between containers, and several ways to accomplish this goal.

Sharing a Volume on the Host

If you create a volume on the host machine, it can be used by multiple different containers at once. This allows you to share data between containers and the host.

For this example we will create a directory on the host, and use that directory as a shared volume between two containers.

Begin by creating a directory to use as a Docker volume with the command:

sudo mkdir /webdata

Create a small test file in this directory with the command:

sudo echo "Hello from the host." >> /webdata/host-hello.txt

Next, launch a container named sql-database from the official PostgreSQL image, and map /webdata on the host to /data on the container with the command:

sudo docker run -it --name sql-database -v /webdata:/data postgres /bin/bash

Once you are at the new container’s command prompt verify that the shared volume is set up correctly with the command:

ls /data

You will see the host-hello.txt file which we created on the host. Let’s add a file to this shared volume with the command: Continue reading “Sharing Volumes Between Containers” »


Install Discourse Forum with Nginx on Ubuntu 16.04

Step 1 – Install Docker on Ubuntu 16.04

The Discourse software is written in Ruby and Javascript, using PostgreSQL as the main database, and Redis as a cache and for transient data. We will install Discourse under the Docker container.
The installation process will be carried out on Ubuntu 16.04. So to begin with, install Docker using the command below.

wget -qO- | sh


After the installation is complete, check the docker service and make sure it’s already running on the system. Continue reading “Install Discourse Forum with Nginx on Ubuntu 16.04” »


Install Netbox on Docker

The first thing to do is the installation of Docker. To do this, open a terminal window and issue the following commands:

Install Docker with the command: 

sudo apt-get install -y

Add your user to the docker group with the command: 

sudo usermod -aG docker $USER.

Log out and log back in to the server. Install docker-compose with the command: 

sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Change the permission of the docker-compose command with the command: 

sudo chmod +x /usr/local/bin/docker-compose

Start the docker daemon with the command 

sudo systemctl start docker

Enable the docker daemon with the command 

sudo systemctl enable docker

To get Netbox Docker up and running run the following commands. There is a more complete Getting Started guide on our wiki which explains every step.

Create Direcotry:

mkdir /var/netbox
cd /var/netbox
git clone -b release
cd netbox-docker
tee docker-compose.override.yml <<EOF
version: '3.4'
- 8000:8080
docker-compose pull
docker-compose up (allow to run docker in the foregorund)
docker-compose up -d  (allow to run docker in the background)

The whole application will be available after a few minutes. Open the URL in a web-browser. You should see the Netbox homepage. In the top-right corner you can login. The default credentials are:

Username: admin
Password: admin
API Token: 0123456789abcdef0123456789abcdef01234567

How to access Netbox

It will take around two to five minutes before Netbox becomes available. During that time, issue the command:

echo "http://$(docker-compose port nginx 8080)/"

The above command will print out the exact port you should use to access Netbox. In my case the following output is printed:


Before you deploy the container, you’ll want to edit the .env file and configure it to meet your needs. Issue the command:

nano env/netbox.env

In that file, you might want to change the line:


The above is the default password for the admin user. Change that to something unique and strong. Alter any other options you might want (such as SUPERUSER_EMAIL) and save the file. 



GoodReads: How to use Docker in a practical way (part 1 – Introduction)

Part 1: Introduction to the terminology


It is not an uncommon situation, for early adopters of newly introduced concepts and technologies, to be totally confused when these can fundamentally change the ways of developing and delivering services. Especially when everybody talks about something like Docker, and how awesome and game changing it is. This confusion happens when we try things early on and rushing straight to testing them without grasping the whole concept and background of this newly introduced technology.

This is why you may have abandoned the whole trend of Linux containers, or because you read some controversial article from yea sayers and naysayers. In this first part, of a series of articles, we will try our best to clear things up and put everything on the right perspective for any developer, sysadmins, Q/A engineers or even enthusiasts who just need the right inspiration to use Linux containers and solve their special IT problems.
We will start from the beginning, with some necessary description of the historical events and concepts and then I will showcase how we can start working with Docker containers. This way, you will be able to understand “what led to the creation of containers”, “what are the building blocks” and “how do they work”. Continue reading “GoodReads: How to use Docker in a practical way (part 1 – Introduction)” »