Skip to content

Instantly share code, notes, and snippets.

@mehdihasan
mehdihasan / install-ansible-in-ubuntu.md
Last active July 19, 2020 22:11
install-ansible-in-ubuntu
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8
python --version
python3 --version
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
sudo apt install python3-pip
@mehdihasan
mehdihasan / install-oc-client-ubuntu.md
Last active April 14, 2025 16:22
Install OC client in Ubuntu/Debian
@mehdihasan
mehdihasan / docker-cleanup.md
Created July 16, 2024 13:01
Automate docker container and image cleanup

Automate container and image cleanup

To automatically delete Docker containers and images older than 15 days, we can set up a cron job that runs a script at specified intervals.

Step 1: Create a Cleanup Script

Create a file named docker-cleanup.sh with the following content:

#!/bin/bash