https://github.com/rabi-siddique/drm
The drm script is a productivity tool for Docker users, designed to simplify container removal. Instead of copying container IDs from docker ps output, users can remove a container by specifying its sequence number in the list.
https://github.com/rabi-siddique/drm
bash bash-scripting docker docker-compose linux programming
Last synced: 2 months ago
JSON representation
The drm script is a productivity tool for Docker users, designed to simplify container removal. Instead of copying container IDs from docker ps output, users can remove a container by specifying its sequence number in the list.
- Host: GitHub
- URL: https://github.com/rabi-siddique/drm
- Owner: rabi-siddique
- Created: 2024-10-19T07:57:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-03T17:09:22.000Z (about 1 year ago)
- Last Synced: 2025-03-25T18:26:09.553Z (9 months ago)
- Topics: bash, bash-scripting, docker, docker-compose, linux, programming
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
When working with Docker, I often find myself repeatedly running `docker ps` to identify the container ID that I need to remove. This process involves manually copying the container ID and then pasting it into the `docker rm` command โ a step I find particularly tedious.
# How `drm` works
I've developed a custom script that enhances a little bit of my productivity by
saving me a Copy Paste :D . Hereโs how it improves my workflow:
- `View Containers`: I start by listing all active containers with docker ps.
- `Select a Container`: Instead of copying IDs, I simply note the position of the container in the list, which is much quicker.
- `Run My Script`: With the command `drm `, where `` is the sequence number of the container, I can remove it directly. No ID copying needed.
- `Container Removed`: Just like that, the container is gone, putting a little less friction on my brain! ๐
# Download and Install
- Download the Script
```bash
sudo curl -o /usr/local/bin/drm https://raw.githubusercontent.com/rabi-siddique/drm/refs/heads/main/drm
```
- Make the Script Executable
```bash
sudo chmod +x /usr/local/bin/drm
```
- Usage
```bash
drm
```
# OS
- `MacOS`: The script has been tested on macOS and should work as expected.
- `Linux`: If you encounter any issues on Linux, please report them to help improve the script.