mirror of
https://github.com/sstent/unifi.git
synced 2025-12-06 06:01:37 +00:00
remove version dependencies
This commit is contained in:
@@ -6,7 +6,7 @@ this Docker container based on Ubuntu Trusty runs a Ubiquiti Unifi5 Controler. T
|
|||||||
|
|
||||||
### build
|
### build
|
||||||
```sh
|
```sh
|
||||||
docker build -t tommi2day/unifi:5.0 -f Dockerfile.unifi .
|
docker build -t tommi2day/unifi -f Dockerfile.unifi .
|
||||||
```
|
```
|
||||||
see also build_unifi.sh
|
see also build_unifi.sh
|
||||||
### exposed Ports
|
### exposed Ports
|
||||||
@@ -40,7 +40,7 @@ docker run -d \
|
|||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
-p 8443:8443 \
|
-p 8443:8443 \
|
||||||
-p 27117:27117 \
|
-p 27117:27117 \
|
||||||
tommi2day/unifi:5.0
|
tommi2day/unifi
|
||||||
```
|
```
|
||||||
see run_unifi.sh for an example
|
see run_unifi.sh for an example
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERS=5.0
|
|
||||||
VMNAME=${1:-unifi}
|
VMNAME=${1:-unifi}
|
||||||
if [ -r Dockerfile.$VMNAME ]; then
|
if [ -r Dockerfile.$VMNAME ]; then
|
||||||
DOCKER_USER=${DOCKER_USER:-tommi2day}
|
DOCKER_USER=${DOCKER_USER:-tommi2day}
|
||||||
#build the container
|
#build the container
|
||||||
docker stop $VMNAME
|
docker stop $VMNAME
|
||||||
docker rm $VMNAME
|
docker rm $VMNAME
|
||||||
docker build -t $DOCKER_USER/$VMNAME:$VERS -f Dockerfile.$VMNAME .
|
docker build -t $DOCKER_USER/$VMNAME -f Dockerfile.$VMNAME .
|
||||||
else
|
else
|
||||||
echo "Usage: $0 VMNAME #Dockerfile.VMNAME must exists"
|
echo "Usage: $0 VMNAME #Dockerfile.VMNAME must exists"
|
||||||
fi
|
fi
|
||||||
|
|||||||
13
run_unifi.sh
13
run_unifi.sh
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
VERS=5.0
|
|
||||||
VMNAME=${2:-unifi}
|
VMNAME=${2:-unifi}
|
||||||
CMD=$1
|
CMD=$1
|
||||||
DOCKER_SHARED=${DOCKER_SHARED:-$(pwd)}
|
DOCKER_SHARED=${DOCKER_SHARED:-$(pwd)}
|
||||||
@@ -11,13 +10,7 @@ if [ -z "$DEBUG" ]; then
|
|||||||
else
|
else
|
||||||
RUN="--rm=true -it --entrypoint bash "
|
RUN="--rm=true -it --entrypoint bash "
|
||||||
fi
|
fi
|
||||||
#windows
|
DOCKER="docker"
|
||||||
if [ "$OSTYPE" = "msys" ]; then
|
|
||||||
P=/
|
|
||||||
else
|
|
||||||
S=sudo
|
|
||||||
fi
|
|
||||||
DOCKER="$S docker"
|
|
||||||
|
|
||||||
#datadir
|
#datadir
|
||||||
if [ ! -d "${SHARED_DIR}" ]; then
|
if [ ! -d "${SHARED_DIR}" ]; then
|
||||||
@@ -60,10 +53,10 @@ $DOCKER run $RUN \
|
|||||||
--hostname $VMNAME \
|
--hostname $VMNAME \
|
||||||
--name ${VMNAME} \
|
--name ${VMNAME} \
|
||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
-p 8880:8880 \
|
-p 8880:8880 \
|
||||||
-p 8443:8443 \
|
-p 8443:8443 \
|
||||||
-p 27117:27117 \
|
-p 27117:27117 \
|
||||||
$DOCKER_USER/$VMNAME:$VERS $1 " >starter
|
$DOCKER_USER/$VMNAME $1 " >starter
|
||||||
if [ "$OSTYPE" = "msys" ]; then
|
if [ "$OSTYPE" = "msys" ]; then
|
||||||
mv starter starter.ps1
|
mv starter starter.ps1
|
||||||
powershell -File starter.ps1
|
powershell -File starter.ps1
|
||||||
|
|||||||
Reference in New Issue
Block a user