https://github.com/zeionara/docker-tools
Useful aliases and scripts for docker which simplify routine operations
https://github.com/zeionara/docker-tools
Last synced: 3 months ago
JSON representation
Useful aliases and scripts for docker which simplify routine operations
- Host: GitHub
- URL: https://github.com/zeionara/docker-tools
- Owner: zeionara
- License: apache-2.0
- Created: 2023-02-14T19:49:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T14:05:08.000Z (about 1 year ago)
- Last Synced: 2025-01-02T07:46:14.091Z (5 months ago)
- Language: Shell
- Size: 216 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker tools
![]()
Useful aliases and scripts for docker which simplify routine operations.
## Installation
To install the project execute the following command, which will fetch the repo to your home directory and update `.bashrc` file (see [setup.sh](setup.sh)):
```sh
curl -Ls https://cutt.ly/setup-docker-tools | bash
```Then to apply changes in your current terminal, re-import `.bashrc` contents:
```sh
. ~/.bashrc
```## Usage
### Structure
The first two letters in every alias are always `dr` which is short for `docker`. The next one or two letters correspond to the action to perform. The mapping is following:
| Letter | Action name | Action name in the standard `docker` tool |
| --- | --- | --- |
| b | build | build |
| d | delete | remove |
| r | run | run |
| s | stop | stop |
| u | up | start |
| v | view | inspect |The remaining letters correspond to the action parameters (see [aliases.sh](aliases.sh) for more details).
### Examples
There are several aliases confugured in the `aliases.sh`, one of which allows to get ip address of a container by checking its image repo tags, so it's very easy to apply this command for sending an http request to container:
```sh
curl $(drvis ku):8081
```Here `drvis` stands for **d**ocke**r** **v**iew **i**p addresses of containers using image repo tag **s**ubstring.
Another command allows to stop all docker containers by filtering their images:```sh
drss foo
```This command is short for "**d**ocke**r** **s**top using image repo tag **s**ubstring", and it will stop any container which uses an image, having substring 'foo' in any of its repo tags.