-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
645 additions
and
530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.PHONY: build | ||
|
||
build: | ||
GOOS=darwin GOARCH=amd64 go build -o bin/dco-darwin-amd64 && \ | ||
GOOS=linux GOARCH=amd64 go build -o bin/dco-linux-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,50 @@ | ||
# 🐳 Docker Color Output | ||
# 🐳 Docker Color Output 2.x | ||
|
||
This package allows you to run Docker commands and get color output. | ||
|
||
## Requirements | ||
|
||
- **php** >= 7.0 | ||
This package allows you to colorize the docker output. | ||
|
||
## ⚡️ Installation | ||
|
||
Clone the repo and add the following lines to `~/.bash_aliases` (`~/.bashrc`, `~/.zshrc`) file. | ||
Download the required binary file for your operating system from the [releases page](../../releases/latest). | ||
|
||
```bash | ||
DOCKER_COLOR_OUTPUT_PATH='/absolute-path-to-cloned-repo' | ||
alias di="$DOCKER_COLOR_OUTPUT_PATH/bin/docker-images" | ||
alias dps="$DOCKER_COLOR_OUTPUT_PATH/bin/docker-ps" | ||
alias dcps="$DOCKER_COLOR_OUTPUT_PATH/bin/docker-compose-ps" | ||
``` | ||
### Aliases | ||
|
||
**Note:** change `DOCKER_COLOR_OUTPUT_PATH` to your absolute path where you cloned the repository. | ||
For convenience, you can use the aliases from the [bash/aliases.sh](bash/aliases.sh) file. Update | ||
the `DOCKER_COLOR_OUTPUT_PATH` variable and run the `source bash/aliases.sh` command. | ||
|
||
## 💥 Usage | ||
|
||
You can also pass all arguments as you pass to the command. | ||
|
||
### 💡 Docker images | ||
|
||
```bash | ||
# The 'docker images' command will be called. | ||
di | ||
di # alias | ||
``` | ||
|
||
```bash | ||
docker images | dco | ||
``` | ||
|
||
![docker images](https://user-images.githubusercontent.com/5787193/93581956-7ae7f580-f9aa-11ea-8f81-d6922e1ca892.png) | ||
|
||
### 💡 Docker ps | ||
|
||
```bash | ||
# The 'docker ps' command will be called. | ||
dps | ||
dps [-a] # alias | ||
``` | ||
|
||
```bash | ||
# The 'docker ps -a' command will be called. | ||
dps -a | ||
docker ps [-a] | dco | ||
``` | ||
|
||
![docker ps](https://user-images.githubusercontent.com/5787193/93581144-69521e00-f9a9-11ea-86bb-c23d7879c689.png) | ||
|
||
### 💡 Docker compose | ||
|
||
```bash | ||
# The 'docker-compose ps' command will be called. | ||
dcps | ||
dcps # alias | ||
``` | ||
|
||
```bash | ||
docker-compose ps | dco | ||
``` | ||
|
||
![docker-compose ps](https://user-images.githubusercontent.com/5787193/93630916-7267dd00-f9f3-11ea-9521-e69152fa86f1.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
DOCKER_COLOR_OUTPUT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)/bin/dco-darwin-amd64" | ||
|
||
di() { | ||
docker images $@ | $DOCKER_COLOR_OUTPUT_PATH | ||
} | ||
|
||
dps() { | ||
docker ps $@ | $DOCKER_COLOR_OUTPUT_PATH | ||
} | ||
|
||
dcps() { | ||
docker-compose ps $@ | $DOCKER_COLOR_OUTPUT_PATH | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.