Multitail Docker compose logs

I’m used to watch logs via multitail and as I migrated to using Docker for development I had to come up a command with which I can spectate container logs.

I ended up with the following

docker-compose logs --no-color -f | multitail -j

For reference


Docker Cannot create container for service db: devmapper: Error mounting

Just wanted to start working and got the following error from Docker:

Cannot create container for service db: devmapper: Error mounting ...

Gladly I remembered that I updated the Linux kernel in the morning so after computer restart I had no issue 🙂

Thanks Arch Linux for the kick to learn Docker

Thanks to Arch Linux and its rolling release strategy it comes with PHP 7.1 as default. After some months of having the following in /etc/pacman.conf

IgnorePkg = php php-apache php-gd php-intl php-mcrypt php-pgsql php-geoip php-cgi php-embed php-enchant php-fpm php-imap php-odbc php-phpdbg php-pspell php-snmp php-sqlite php-tidy php-xsl

I pushed myself to learn more and finally start creating some Dockerfiles for some legacy PHP projects.

Docker host vs. local host PHP

Connect to localhost MySQL from Docker container

To test connection to MySQL/MariaDB server running on localhost from Docker container try:

docker run --rm -it --net=host mariadb mysql -u root -h
--rm  Automatically remove the container when it exits
-i    Keep STDIN open even if not attached
-t    Allocate a pseudo-TTY
--net Connect a container to a network