Add context init
command to set up remote swarm
This commit is contained in:
parent
81e24b6f72
commit
dd9444b036
12
abra
12
abra
@ -375,11 +375,19 @@ sub_context_help() {
|
|||||||
echo "Usage: $PROGRAM_NAME [global opts] context <subcommand> [sub opts]"
|
echo "Usage: $PROGRAM_NAME [global opts] context <subcommand> [sub opts]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Subcommands:"
|
echo "Subcommands:"
|
||||||
echo " init HOST [USER] [PORT] set up remote Docker context"
|
echo " create HOST [USER] [PORT] set up remote Docker context"
|
||||||
echo " use activate remote Docker context"
|
echo " use HOST activate remote Docker context"
|
||||||
|
echo " init HOST activate swarm mode"
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_context_init() {
|
sub_context_init() {
|
||||||
|
load_context
|
||||||
|
|
||||||
|
docker swarm init || true
|
||||||
|
docker network create --driver=overlay proxy --scope swarm || true
|
||||||
|
}
|
||||||
|
|
||||||
|
sub_context_create() {
|
||||||
HOST="$1"
|
HOST="$1"
|
||||||
USERNAME="$2"
|
USERNAME="$2"
|
||||||
PORT="$3"
|
PORT="$3"
|
||||||
|
Loading…
Reference in New Issue
Block a user