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”

Tar Files Explained

In UNIX, tar files are often used as a form a file archival. Such archives have different uses like: backups, migrations, installations, versioning, etc… Often you will hear the term Tarball, which simply means a tar archive.

Tar simple means Tape ARchive, this was originally developed in 1979 as a solution to archive to tape. The utility as then evolved into a standard archival utility.

By itself Tar does not provide any form of checksum to assure that the files originally are the same as the one inserted in the Tar Ball. In order to Continue reading “Tar Files Explained”

Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 2)

Ok, after the long part 1, we continue our journey with Standard Input or STDIN. Following the concepts we discussed in part 1, we know that STDIN has a standard file descriptor of 0. In other words, every process created by the kernel in UNIX, has file descriptor 0 assigned to STDIN.

STDIN is the way a process or a command reads the provided input to perform some action, to then, produce STDOUT, STDERR, or sometimes nothing (In UNIX nothing often means success). Continue reading “Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 2)”

Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 1)

For a lot of people, STDIN (standard input), STDOUT (standard output), and STDERR (standard error) are one of the most confusing subjects. Hopefully, in this post, I can explain once and for all the concepts.

In UNIX you might have heard people mention that everything is a file. Well that is close to correct. I would say that in UNIX everything is defines around file descriptors or FD.

A file descriptor or FD, is a unique identifier referred to as a handle, which identifies a file, an input/output resource, network resource, etc. It is normally a positive number that starts from 0 zero. In UNIX, every process gets, at the very least, 3 file descriptors: Continue reading “Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 1)”