22 lines · 433 B · Shell
RawDownload
#!/usr/bin/env bash stop() {    if status ; then        docker stop "$NAME"        echo "$NAME stopped"    fi} status() {    if docker ps --format '{{.Names}}' | grep -q "^${NAME}$" ; then        echo "$NAME running"    else        echo "$NAME not running"        return 1    fi    return 0} docker_ip() {    docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{"\n"}}{{end}}' "$NAME" | head -n 1}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t