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

Deploying a Python Web Application with Docker and Flask

Deploying a Python Web Application with Docker and Flask

Tiempo de lectura: < 1 minuto In this tutorial, we will learn how to use Docker to deploy a basic Python web application using the Flask framework. :snake: Step 1: Project Structure Create a new folder named “MyAppFlask” in your project directory and navigate to it: mkdir ~/projects/MyAppFlask cd ~/projects/MyAppFlask Step 2: Flask Application Code Create a file named app.py with … Read more

Docker container to generate a React build

Docker container to generate a React build

Tiempo de lectura: < 1 minuto Hello, today I’m going to share a very useful container for generating a React build. It already contains everything needed to generate it. Additionally, it is compatible with Vite.js. The first thing we are going to do is create the file docker-compose.yml version: ‘3.1’ services: react-app: container_name: react-app build: context: . dockerfile: Dockerfile volumes: – … Read more

Install Docker and Docker Compose on Ubuntu, very fast

Tiempo de lectura: < 1 minuto Let’s install Docker Compose on Ubuntu by following the official Docker website instructions. Update dependencies and install necessary packages: sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg sudo gpg –dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg # Add the repository to Apt sources: echo \ … Read more

Use a Docker Registry with authentication together with Kubernetes

Use a Docker Registry with authentication together with Kubernetes

Tiempo de lectura: 4 minutos If your Docker Registry requires authentication with a username and password, you’ll need to provide those credentials to the Kubernetes cluster so it can access the registry images during deployment. Here’s an example of how you can do it: Using Docker Compose with Docker Registry with Authentication Let’s assume your original Docker Compose looks like … Read more

Migrate a Docker Compose to Kubernetes

Migrate a Docker Compose to Kubernetes

Tiempo de lectura: 5 minutos Today, we’re going to learn, with an example, how to migrate a Docker Compose (https://www.docker.com/) setup to Kubernetes (https://kubernetes.io/). First, let me explain what the two mentioned technologies are: Docker Compose: Docker Compose is a tool that allows you to define and run multi-container Docker applications. With Docker Compose, you can describe the entire configuration … Read more

Add a Discord webhook to the Ofelia Docker container

Add a Discord webhook to the Ofelia Docker container

Tiempo de lectura: < 1 minuto Today, we’ll learn how to set up Ofelia to notify us via Discord about the executions of the Jobs it performs. The Ofelia container (https://github.com/mcuadros/ofelia) allows us to automate tasks with cron among our Docker containers. I find it very useful as it enables us to quickly save and replicate a Cron configuration in our … Read more

Notify via a webhook, in this case Discord, when ClamAV detects an infected file.

Notify via a webhook, in this case Discord, when ClamAV detects an infected file.

Tiempo de lectura: 2 minutos To set up notifications through Discord when ClamAV detects a virus, you can follow these general steps. Keep in mind that these steps are a guide and may require adjustments based on your specific environment and preferences. 1. Create a Discord Webhook: Open your Discord server and select the channel where you want to receive … Read more

Add ClamAV Antivirus for Analyzing Files and Docker Environments, Using Docker Compose

Add ClamAV Antivirus for Analyzing Files and Docker Environments, Using Docker Compose

Tiempo de lectura: 3 minutos ClamAV is an open-source program designed to detect viruses, malware, and other threats on Unix and Linux operating systems. Its name is an abbreviation of “Clam Antivirus.” Although it originated in the Linux environment, it is also compatible with other operating systems, including Windows and macOS. Here are some key aspects of ClamAV: Scanning Engine: … Read more

Create a Docker container that allows us to run Docker commands inside it.

Create a Docker container that allows us to run Docker commands inside it.

Tiempo de lectura: < 1 minuto Today, I bring you this tutorial born out of the need to execute Docker commands using the task scheduler Ofelia (https://devcodelight.com/automatizar-tareas-con-cron-desde-docker-con-ofelia) To execute Docker commands within a container that is running with Docker on a local machine, the first thing we need to do is add a Docker client to our container. To create the … Read more