1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-04 01:17:49 +08:00

Add fancy bash prompt from orchestration workshop (#28)

* Add bash prompt

* remove curly braces

* Change shell from ash to bash

* Add inputrc for bash
This commit is contained in:
Vincent De Smet
2016-11-30 11:12:34 +08:00
committed by Marcos Nils
parent 6371ee665e
commit d3e20724e9
5 changed files with 101 additions and 4 deletions

22
docker-prompt Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
case "$DOCKER_HOST" in
*:3376)
echo swarm
;;
*:2376)
echo $DOCKER_MACHINE_NAME
;;
*:2375)
echo $DOCKER_MACHINE_NAME
;;
*:55555)
echo $DOCKER_MACHINE_NAME
;;
"")
echo local
;;
*)
echo unknown
;;
esac