-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfe1
executable file
·33 lines (30 loc) · 882 Bytes
/
fe1
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
#!/bin/sh
reset
clear
NAME=furiend_fe1
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 fe1 \
--ip 172.20.0.11 \
--volume "$(pwd):/furiend/:rw" \
--volume "$(pwd)/docker/.vimrc:/root/.vimrc:rw" \
--volume "$(pwd)/docker/.profile:/root/.profile:rw" \
--entrypoint /furiend/bin/lua \
--publish 127.0.0.1:18001:18001 \
furiend \
/furiend/src/fe1/main.lua
fi