SSH Public/Private Keys Explained

I decided to write this post mainly because during my career, I’ve experienced many people not understanding private/public keys, the different uses, when and when not to use them.

This article is going to cover public/private key pairs to use only with SSH, but there are many uses for public/private key pair, however, they are beyond the scope of this article.

In the most simpler terms, a private/public key pair can be considered like a door lock and a key, the door lock can be compared to the public key, and the key to the provate key. Everyone can see the door lock, but only the key can open it, you need both to be able to unlock the door.

Continue reading “SSH Public/Private Keys Explained”

Relocate Docker Data Root Directory

Lately I had a need to move the Docker root directory to a different filesystem. After researching the item and saw that the documentation out there was limited and not very clear, I decided to write the necessary steps here.

By default, on most systems, the docker root directory is located in the directory /var/lib/docker, this directory is used to store thigs like images, volumes, and other different docker runtime items. In order to move this directory to a different location, let’s say /opt/docker-root, there are few steps required, more specifically:

Continue reading “Relocate Docker Data Root Directory”

Pipe ( | )? What is it and how you use it

The pipe (|) is one of the foundational things in UNIX.  The Pipe allows you to redirect STDOUT to STDIN of the next commend.

Understanding STDIN, STDOUT, and STDERR is important to better understand the pipe. I have an article which explains STDIN, STDOUT, and STDERR here. Make sure you read it before proceeding.

Continue reading “Pipe ( | )? What is it and how you use it”

Convert WordPress Server into Docker Containers (Part 1)

In this post, we are going to discuss how to migrate a traditional WordPress + MySql or MariaDB into Docker containers. This post is very involved and requires knowledge spanning a wide spectrum of technologies. This post assumes that you know, or can find out about opening firewall ports, UNIX/Linux commands, etc. And only focus on the necessary step to convert WP+DB into Docker containers. Now, let’s discuss the prerequisites:

Prerequisites:

Continue reading “Convert WordPress Server into Docker Containers (Part 1)”

Convert WordPress Server into Docker Containers (Part 2)

Welcome to part 2. Time to move the next steps, and complete the migration. By the time we are done, we will have:

  • External facing NGINX container proxying to the internal WordPress instance.
  • SSL certificate issuing and renewals with a companion container
  • A WordPress container with your site migrated
  • A MariaDB database container containing your migrated database

Enough talking, let’s get to work!

Continue reading “Convert WordPress Server into Docker Containers (Part 2)”

Backup MySql Databases Running in Containers

Backing up MySql or mariaDB databases is a straight forward task. The task is similar in backing up a regular database located in a Linux server. We would issue the following command:

mysqldump -u {USER} -p{PASSWORD} {DATABASE} > {THE BACKUP FILE}

On a Linux server, the command would look something similar to: Continue reading “Backup MySql Databases Running in Containers”

Openssl Enable Legacy Renegotiation

If you see an error specifying something similar to “unsafe legacy renegotiation disabled” when attempting a secure TSL/SSL connection. I have the solution for you. I decided to write this post because searching the Internet did not find any solutions, so I had to roll my sleeves up, and use the old school approach. To actually understand and troubleshoot the problem.

If you get this error, Continue reading “Openssl Enable Legacy Renegotiation”

Backing Up Docker Volumes

Lately I was in need of backing up Docker volumes, and just like anything else, I searched the Internet on how to do so and did not find concrete articles on how to do it. So, I’ve decided to write an article on how to backup Docker volumes.

This article assumes that you know already how to create docker volumes, attaching them to containers, etc. Only backups will be discussed.

The best way I found to backup a Docker volume is to spawn a container which has the volume mounted, and a external directory exposed. Within the container, Continue reading “Backing Up Docker Volumes”