Installing Docker on Linux Mint 21.2 "Victoria"

Docker has become an indispensable tool for developers, offering containerized applications that can be effortlessly distributed and executed. However, installation on Linux Mint, especially the latest versions, can sometimes be a hurdle. In this guide, we'll demonstrate how to successfully set up Docker on Linux Mint 21.2 "Victoria" using the official Docker script with a minor modification.

Prerequisites:

  • Linux Mint 21.2 "Victoria".
  • Internet connection.
  • Terminal and basic command-line operations knowledge.

Using Docker's Installation Script with Modifications

Docker provides an installation script that makes setting it up on various Linux distributions easier. However, we'll need to adjust the script slightly for Linux Mint 21.2 "Victoria".

Step 1: Download the Script

curl -fsSL https://get.docker.com -o get-docker.sh

Step 2: Modify the Script for Linux Mint 21.2 "Victoria"

Open the script in Visual Studio Code (or your preferred editor):

code get-docker.sh

Locate the section that identifies the distribution (something like this in September 2023)

lsb_dist=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'id' | cut -d ':' -f 2 | tr -d '[:space:]')

and after that line add:

if [ "$lsb_dist" = "mint" ]; then
dist_version="jammy"
fi

Save the file and exit. With this code the repositories we are going to grab are the ones for jammy (ubuntu 22.04 LTS, the version from where Linunx Mint 21.2 "Victoria" comes from. This is the real trick on all the process.

Step 3: Execute the Script

sudo sh get-docker.sh

Note: Always review any script from the internet before executing it. You've made a modification, but it's a good habit to inspect any external scripts.

Step 4: Add Your User to the Docker Group

This allows you to run Docker commands without needing sudo.

sudo usermod -aG docker ${USER}

Log out and back in for these changes to take effect, or run:

newgrp docker

Verifying Docker Installation

Verify that Docker is installed and running with:

sudo systemctl status docker

Test Docker Installation

Run a test Docker container to ensure proper setup:

sudo docker run hello-world

Conclusion

You now have Docker up and running on Linux Mint 21.2 "Victoria"! With a minor modification to Docker's script, you've tailored the installation to your specific OS version, paving the way for seamless containerization tasks ahead.

Drupal8 : Fix the error where you can only access the home

Well this happen a lot for me. I'm developing a marvelous site and then when I try to migrate it to their real URLs, it just doesn't works. Lets see some commons errors:

Wrong .HTACCESS 
Maybe we are developing in a CPANEL test account, when we try to zip it, we forget that hidden files doesn't appear and we dont select them. When we unzip the file in the server, some hosting create a fake htaccess that make us believe that we have the good one, check their date of creation to see if they are at the same date as the file index.php or similars. The solution is to check an compare both htaccess files. The error it usually give is that you can access the Home of your site but no other urls, even using the ?q=user trick.

Bad DATABASE username or Password
This will give you a blank page or a page telling you that your site have some errors. Check you PHP error logs to see what's happening.




Migrating a DB with Emoticons and BigDump

¿So yure having trouble with those peski emoticons?

Just make sure, that your big dump is using the right encoding.

Don't use UTF8, use this string: $db_connection_charset = 'utf8mb4';

And youre done!

Say Goodbye to FirePHP: How to log server info to the Browser Console in 2019

Years ago I was a fanatic of FirePHP to send variables to my Firefox Console. It was the easiest way to debug my apps back there when using vanilla PHP.

Time passed and I didn't develop too much until now!. So when trying to revive past glories, I discovered that FirePHP doesn't work anymore, at least with Firefox Developer Edition.

So what to do? We will use QuantumPHP of course!: Here are the easy steps:



Step 1: Get Firefox Developer Edition (a.k.a Quantum yei!)

Step 2: Go to the code src and put this file in your project:




























Step 3: Use this code:


include ('/php/quantumphp.php');
QuantumPHP::$MODE = 2;
// Optional debug size. Defaults to 5kB
QuantumPHP::$HEADER_LIMIT = 16000;
// Logging strings
QuantumPHP::log('Regular log');
QuantumPHP::warn('Regular warn');
QuantumPHP::error('Regular error');
QuantumPHP::send();

 And youre set!


Help my code is not working!
Check your PHP output_buffering variable. I changed it from 4096 to something more and it started working.

Hope this works. Feels fine to write again!.





























Drupal 8 : Succesfully disable E_DEPRECATED in Wamp 3.1.3

So I was having a hard time in a Drupal 8.2 installation and the new Wamp64 3.1.3.

As I was using PHP 7.2, a lot of deprecated code is running in that old version of Drupal, so I receive a lot of screens like this:

 


My first try was to update the php.ini settings and modify the part of error_reporting

This was the normal way to update that error_reporting stuff long ago in Drupal


Currently using Visual Studio Code - Long Live the empire

But to no avail. As I learned, Drupal somehow change this behaviour to suit his need. So there's a simple way to fix this:

Fixing the E_DEPRECATED

Simply go to your sites/default/settings.php and put this line in the end:

error_reporting(E_ALL & ~E_DEPRECATED);


And that's it. With this code you are overwriting the default settings that drupal use to work.

Also, maybe you're having the same problem with your CRM or WebApp of election. Maybe you should test putting this in your code to see if it's our app overwriting the php.ni settings.

Have a good one!