build.sh: check permissions
This commit is contained in:
parent
1d16294c04
commit
9af0f4aadb
14
build.sh
14
build.sh
|
@ -1,2 +1,12 @@
|
|||
docker build --network host -t msrewards .
|
||||
docker run -d --restart unless-stopped -p 1234:1234 -p 2345:2345 -ti --shm-size=2gb --name MsRewards msrewards
|
||||
#!/bin/bash
|
||||
|
||||
docker-do () { # Check if sudo needs to be used
|
||||
if id -nG "$(whoami)" | grep -qw "docker"; then
|
||||
docker $@
|
||||
else
|
||||
sudo docker $@
|
||||
fi
|
||||
}
|
||||
|
||||
docker-do build --network host -t msrewards .
|
||||
docker-do run -d --restart unless-stopped -p 1234:1234 -p 2345:2345 -ti --shm-size=2gb --name MsRewards msrewards
|
||||
|
|
Loading…
Reference in New Issue