-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdc
executable file
·32 lines (29 loc) · 837 Bytes
/
dc
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
#!/bin/sh
reset
clear
NAME=furiend_dc
RUNNING=$(docker container list --filter name=$NAME --quiet)
STOPPED=$(docker container list --all --filter name=$NAME --quiet)
if [ -n "$RUNNING" ]; then
echo "docker container is already running: $NAME"
elif [ -n "$STOPPED" ]; then
docker container start \
--attach \
--interactive \
$NAME
else # not created
docker container run \
--tty \
--interactive \
--name $NAME \
--workdir /furiend \
--network furiend \
--hostname dc \
--ip 172.20.0.10 \
--volume "$(pwd):/furiend/:rw" \
--volume "$(pwd)/docker/.vimrc:/root/.vimrc:rw" \
--volume "$(pwd)/docker/.profile:/root/.profile:rw" \
--entrypoint /furiend/bin/lua \
furiend \
/furiend/src/dc/main.lua
fi