Help and docs
Sign in

grindlemire/dotfiles code browser

01-07-demo_09246a78_add_activity_feed_api 022fce1
Bash · 65 lines · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# "ssh" into a docker container
dssh() {
    if [ -n "$1" ]
    then
            docker exec -it $@ /bin/bash
    fi
}

# execute a command into a docker container
dexec() {
    if [ -n "$1" ]
    then
            docker exec -it $@
    fi
}

# bring up docker-containers and run them in the background
dls() {
    docker container ls $@
}

# jump into the logs of a docker container
dlog() {
    docker logs -f $@
}

# bring up docker-containers and run them in the background
dstart() {
    docker container start $@
}

# stop a set of docker containers
dstop() {
    docker container stop $@
}

# jump into the logs of the docker-containers
dlog() {
    docker container logs -f $@
}

# stop and kill the current docker containers
drm() {
    docker container stop $@ && docker rm -f $@
}

# bring up docker-containers and run them in the background
dcup() {
    docker-compose up -d $@
}

# stop a set of docker containers
dcstop() {
    docker-compose stop $@
}

# jump into the logs of the docker-containers
dclog() {
    docker-compose logs -f $@
}

# stop and kill the current docker containers
dcrm() {
    docker-compose stop && docker-compose rm -f $@
}