After creating your new Debian/Ubuntu instance on your Linode manager console follow following steps.

Instance update and docker install

1.) To upgrade your Linux instance with the newest relevant updates, to get our instance up to date (in our case running Ubuntu) .

apt-get upgrade
apt-get update

2.) There is an issue with Linode and Docker with dependancies, therefore following command needs to be run as well before continuing with docker installation:

apt-get install dmsetup && dmsetup mknodes

Docker installation

3.) After that we need to install Docker itself with a lovely curl command:

curl -sSL | sh

With that installation of Docker on Linode is finished. But it a very basic one.

Before getting WordPress image installed, image presumes you already have MySQL server running.

With this command we are creating docker image with wordpressdb name and adding password with mysql database name, as well as it’s version. In the following command we will use mysql:tag, with tag representing version 5.7.

docker run --name wordpressdb -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7

Now we need to create WordPress image with the existing mysql container which we named in previous command, wordpressdb:

docker run --name wordpresscu --link wordpressdb:mysql -d wordpress

Extra information:

But since I was encountering problems with some part it’s important that if anyone needs it, that we add a command for removal of a container and showing all containers.

Displays all containers if they are run or not:
docker ps -a

Removes the chosen container:
docker rm