-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·29 lines (26 loc) · 1.04 KB
/
test.sh
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
echo Deleting container
export container=$(docker ps -a |grep duplicacy-web-container | awk '{print $1}');
if [ -n "$container" ]; then
docker rm $container || exit 1
fi
echo Deleting Image
export image=$(docker images |grep saspus/duplicacy-web | awk '{print $3}')
if [ -n "$image" ]; then
docker rmi $image || exit 2
fi
temp=/tmp/dupl01
#rm -rf $temp
mkdir $temp
#chmod 777 $temp
docker run --name duplicacy-web-container \
--hostname duplicacy-web-docker \
--publish 4875:3875/tcp \
--env USR_ID=$(id -u) \
--env GRP_ID=$(id -g) \
--env TZ="America/Los_Angeles" \
--volume $temp/config:/config \
--volume $temp/logs:/logs \
--volume $temp/cache:/cache \
--volume $temp/backuproot:/backuproot:ro \
--volume $temp/storage:/storage \
saspus/duplicacy-web:latest