Limiting RAM, CPU, or Disk Space for Docker Containers using Docker Compose

Limiting RAM, CPU, or Disk Space for Docker Containers using Docker Compose

Tiempo de lectura: 2 minutos Reading time: 3 minutes In Docker Compose, you can limit the RAM, disk space, and CPU usage of containers to prevent them from consuming excessive resources on the system. Here’s a tutorial on limiting RAM, disk space, and CPU usage in Docker Compose containers. Step 1: Create the docker-compose.yml file First, you need to create … Read more

Install Loki Plugin for Docker on ARM64

Install Loki Plugin for Docker on ARM64

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute When we install the Loki plugin for Docker on ARM64, we encounter an error. To solve this, we need to do the following: First, we install the plugin to create the directories: docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions Now, we install GO: Go outside the Docker folder and execute: ... Read more

Uninstall Docker in Ubuntu

Uninstall Docker in Ubuntu

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute To uninstall Docker in Ubuntu, you need to use the following command: dpkg -l grep -i docker A list of installed Docker packages will be displayed: Next, you need to uninstall each package separately. Run the following command: sudo apt-get purge -y docker-compose-plugin Finally, execute this command: sudo apt autoremove ... Read more

Fixing ‘Call to undefined function imagecreatefromjpeg()’ error in PHP Docker container by importing PHP GD extension

Fixing ‘Call to undefined function imagecreatefromjpeg()’ error in PHP Docker container by importing PHP GD extension

Tiempo de lectura: < 1 minuto Reading time: < 1 minutes If we are using image processing functions in PHP, we need to install and enable PHP GD in the Docker container. To do this, we go to our Dockerfile and add the following: # syntax=docker/dockerfile:1 FROM php:7.2.5-apache RUN docker-php-ext-install mysqli RUN docker-php-ext-install pdo_mysql RUN apt-get update && \ apt-get install ... Read more

Adding PDO pdo_mysql Extension in Apache + PHP Docker Container

Adding PDO pdo_mysql Extension in Apache + PHP Docker Container

Tiempo de lectura: 2 minutos Reading time: 2 minutes Today I’m going to show you how to install the PDO pdo_mysql extension to use Codeigniter or RedBeans, etc… We have the following docker-compose.yml file: version: “3.1” services: miservicio_mariadb: image: mariadb container_name: mariadb_container env_file: – ./Dockerfile/mysql.env environment: MYSQL_DATABASE: “db_prueba” MYSQL_USER: “user_prueba” MYSQL_PASSWORD: “pass_mysql” MYSQL_ROOT_PASSWORD: “contra@prueba” volumes: – ./config/mariadb:/var/lib/mysql expose: – 3306 … Read more

Unir dos contenedores definidos dentro de dos docker-compose.yml distintos usando external_links en Docker Compose

Unir dos contenedores definidos dentro de dos docker-compose.yml distintos usando external_links en Docker Compose

Tiempo de lectura: 2 minutos Reading time: < 1 minute Today I’m going to show you how you can connect two containers defined in separate docker-compose.yml files. We have the following: File docker-compose-db.yml: version: "3.1" services: miservicio_mariadb: image: mariadb container_name: mariadb_container env_file: - ./Dockerfile/mysql.env environment: MYSQL_DATABASE: "db" MYSQL_USER: "user" MYSQL_PASSWORD: "pass" MYSQL_ROOT_PASSWORD: "pass_root" volumes: - ./config/mariadb:/var/lib/mysql expose: - 3306 ports: ... Read more

Connecting Two Separate Docker Compose Setups Using a Network: Nginx Proxy Manager + PHP + MariaDB + PHPMyAdmin

Connecting Two Separate Docker Compose Setups Using a Network: Nginx Proxy Manager + PHP + MariaDB + PHPMyAdmin

Tiempo de lectura: 2 minutos Reading time: 2 minutes To connect two separate Docker Compose setups using the same network, you need to create a custom network in Docker and then add all the services from both Docker Compose setups to that custom network. Here is the updated Docker Compose file for Nginx Proxy Manager with the name of the … Read more

Top Popular and Useful Docker Containers

Top Popular and Useful Docker Containers

Tiempo de lectura: 3 minutos Reading time: 3 minutes Here I bring you a list of some of the most popular and useful Docker containers that exist. Each of these containers is widely used and maintained by the Docker community. Nginx: A fast and lightweight web server and reverse proxy. https://hub.docker.com/_/nginx MySQL: One of the most popular relational database management … Read more

Create a Docker Compose with PHP + Nginx + MySQL (MariaDB) + Nginx Proxy Manager (for HTTPS SSL certificates)

Create a Docker Compose with PHP + Nginx + MySQL (MariaDB) + Nginx Proxy Manager (for HTTPS SSL certificates)

Tiempo de lectura: 3 minutos Reading time: 3 minutes In this tutorial, I will show you how to create a docker-compose.yml file to set up a complete local development environment with PHP, NGINX, MariaDB, Nginx Proxy Manager for SSL, and PhpMyAdmin. Getting Started The first thing we need to do is to create a directory on our machine and create … Read more

Create a Dockerfile with PHP + MySQL (MariaDB)

Create a Dockerfile with PHP + MySQL (MariaDB)

Tiempo de lectura: 2 minutos Reading Time: 2 minutes Here’s an example of a Dockerfile to create a web server with PHP and MariaDB: # Define the Docker base image FROM php:7.4-apache # Update package repositories RUN apt-get update # Install necessary dependencies RUN apt-get install -y \ mariadb-client \ libzip-dev \ zip \ unzip # Install required PHP extensions … Read more