Skip to content

Commit

Permalink
implemented stop and connect script
Browse files Browse the repository at this point in the history
  • Loading branch information
djonasdev committed Jan 24, 2019
1 parent 564d763 commit e958eb4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
7 changes: 6 additions & 1 deletion docker-build.sh
Expand Up @@ -2,4 +2,9 @@

cd `dirname $0`

docker build -t djonasdev/synology-docker-radicale-server ./docker/
#docker command. You can use "sudo docker" if you need so
DOCKER="docker"
#Image name
IMAGE="djonasdev/synology-docker-radicale-server"

$DOCKER build -t $IMAGE ./docker/
9 changes: 9 additions & 0 deletions docker-connect.sh
@@ -0,0 +1,9 @@
#!/bin/sh
#Open bash shell in the container

#docker command. You can use "sudo docker" if you need so
DOCKER="docker"
#Image name
IMAGE="djonasdev/synology-docker-radicale-server"

$DOCKER exec -it $($DOCKER ps -a -q --filter ancestor=$IMAGE --format="{{.ID}}") /bin/sh
3 changes: 2 additions & 1 deletion docker-run.sh
Expand Up @@ -13,8 +13,9 @@ DOCKER_ARGS=""
IMAGE="djonasdev/synology-docker-radicale-server"

#Stop the old instance if already running
$DOCKER rm $($DOCKER stop $($DOCKER ps -a -q --filter ancestor=$IMAGE --format="{{.ID}}"))
./docker-stop.sh

#Start the container
$DOCKER $DOCKER_ARGS run \
-v $VOLUME_PATH:/data \
-p 127.0.0.1:5232:5232 \
Expand Down
10 changes: 10 additions & 0 deletions docker-stop.sh
@@ -0,0 +1,10 @@
#!/bin/sh
#Stop and remove the docker container

#docker command. You can use "sudo docker" if you need so
DOCKER="docker"
#Image name
IMAGE="djonasdev/synology-docker-radicale-server"

#Stop the old instance if already running
$DOCKER rm $($DOCKER stop $($DOCKER ps -a -q --filter ancestor=$IMAGE --format="{{.ID}}"))

0 comments on commit e958eb4

Please sign in to comment.