diff --git a/README.md b/README.md index e50d91c..50a05ef 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ this Docker container based on Ubuntu Trusty runs a Ubiquiti Unifi5 Controler. T ### build ```sh -docker build -t tommi2day/unifi:5.0 -f Dockerfile.unifi . +docker build -t tommi2day/unifi -f Dockerfile.unifi . ``` see also build_unifi.sh ### exposed Ports @@ -40,7 +40,7 @@ docker run -d \ -p 8080:8080 \ -p 8443:8443 \ -p 27117:27117 \ - tommi2day/unifi:5.0 + tommi2day/unifi ``` see run_unifi.sh for an example diff --git a/build_unifi.sh b/build_unifi.sh index 615a7b9..2a406fe 100644 --- a/build_unifi.sh +++ b/build_unifi.sh @@ -1,13 +1,11 @@ #!/bin/bash - -VERS=5.0 VMNAME=${1:-unifi} if [ -r Dockerfile.$VMNAME ]; then DOCKER_USER=${DOCKER_USER:-tommi2day} #build the container docker stop $VMNAME docker rm $VMNAME -docker build -t $DOCKER_USER/$VMNAME:$VERS -f Dockerfile.$VMNAME . +docker build -t $DOCKER_USER/$VMNAME -f Dockerfile.$VMNAME . else echo "Usage: $0 VMNAME #Dockerfile.VMNAME must exists" fi diff --git a/run_unifi.sh b/run_unifi.sh index 07f31f3..d95eb82 100644 --- a/run_unifi.sh +++ b/run_unifi.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -VERS=5.0 VMNAME=${2:-unifi} CMD=$1 DOCKER_SHARED=${DOCKER_SHARED:-$(pwd)} @@ -11,13 +10,7 @@ if [ -z "$DEBUG" ]; then else RUN="--rm=true -it --entrypoint bash " fi -#windows -if [ "$OSTYPE" = "msys" ]; then - P=/ -else - S=sudo -fi -DOCKER="$S docker" +DOCKER="docker" #datadir if [ ! -d "${SHARED_DIR}" ]; then @@ -60,10 +53,10 @@ $DOCKER run $RUN \ --hostname $VMNAME \ --name ${VMNAME} \ -p 8080:8080 \ - -p 8880:8880 \ + -p 8880:8880 \ -p 8443:8443 \ -p 27117:27117 \ - $DOCKER_USER/$VMNAME:$VERS $1 " >starter + $DOCKER_USER/$VMNAME $1 " >starter if [ "$OSTYPE" = "msys" ]; then mv starter starter.ps1 powershell -File starter.ps1