How to stop a Docker Compose container and delete the associated image, then create a new build

How to stop a Docker Compose container and delete the associated image, then create a new build

Tiempo de lectura: < 1 minuto Today we’re going to learn how to delete the Docker image when performing a Docker Compose down to then regenerate an update without generating garbage. The command we should use to stop the container and delete the associated image is: docker-compose down –rmi all This will remove the associated images of that Docker Compose. To … Read more

Redirecting PHP Errors to Docker Console or Linux Console

Redirecting PHP Errors to Docker Console or Linux Console

Tiempo de lectura: 2 minutos Today we’re going to learn how to create a handler to redirect PHP errors to the Linux or Docker console. The first thing we need to do is to create a handler, we can call it exception_handler.php. And let’s add the following: <?php function manejarExcepcion($excepcion) { // Obtener información sobre la excepción $mensaje = ‘ERR: … Read more

Installing Docker and Docker Compose on Debian in Minutes

Installing Docker and Docker Compose on Debian in Minutes

Tiempo de lectura: < 1 minuto Today we’re going to learn how we can install Docker and Docker Compose on Debian very quickly. First, we add the Debian repository keys. Now we install the latest version of Docker sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin Run Docker sudo docker run hello-world We can configure so that we don’t need to … Read more

Create a Docker Container to Compress Images Using MozJpeg

Create a Docker Container to Compress Images Using MozJpeg

Tiempo de lectura: 3 minutos Today we are going to create a Docker container that will allow us to compress jpg images within a directory. Compressing images is very important, especially when setting up a web service. This container will provide a powerful image compressor created by Mozilla and will speed up the download process for our users. First, we … Read more

Deja de instalar servicios en tu VPS, usa Docker

Tiempo de lectura: 2 minutos What is Docker? Docker is an open-source platform that automates the deployment of applications within software containers. These containers encapsulate all the necessary dependencies for an application to run efficiently in any environment, from development to production. Unlike traditional virtual machines, Docker containers do not include a complete operating system, making them extremely lightweight and … Read more

How to stop a Docker Compose container and delete the associated image, then create a new build

How to stop a Docker Compose container and delete the associated image, then create a new build

Tiempo de lectura: < 1 minuto Today we’re going to learn how to delete the Docker image when performing a Docker Compose down to then regenerate an update without generating garbage. The command we should use to stop the container and delete the associated image is: docker-compose down –rmi all This will remove the associated images of that Docker Compose. To … Read more

Redirect PHP errors to Docker console or Linux console

Redirect PHP errors to Docker console or Linux console

Tiempo de lectura: < 1 minuto Today we’re going to learn how to create a handler to redirect PHP errors to the Linux or Docker console. The first thing we need to do is to create a handler, we can call it exception_handler.php. And let’s add the following: <?php function handleException($exception) { // Get information about the exception $message = ‘ERR: … Read more

Install Docker and Docker Compose on Debian, quickly.

Install Docker and Docker Compose on Debian, quickly.

Tiempo de lectura: < 1 minuto Today we’re going to learn how we can install Docker and Docker Compose on Debian very quickly. First, we add the Debian repository keys. # Add Docker’s official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # … Read more

How to clear Docker build cache

How to clear Docker build cache

Tiempo de lectura: < 1 minuto To maintain our Docker system, we need to consider that the Build cache can fill up with unused data. In this case, we have 31.24 Gigabytes of cache. To remove it, we’ll need to use the following command: docker builder prune -a Or force deletion with: docker builder prune -a –force Clean manually: If necessary, … Read more