Created
September 18, 2020 15:46
-
-
Save quells/d273dc12a0b7d163254270224314f3f8 to your computer and use it in GitHub Desktop.
Run UniFi Controller in a Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATA = $(shell pwd)/data | |
LOGS = $(shell pwd)/logs | |
TZ = America/Los_Angeles | |
NAME = unifi | |
IMAGE = jacobalberty/unifi:stable | |
.PHONY: run | |
run: | |
docker run -d --rm --init \ | |
-p 8080:8080 \ | |
-p 8443:8443 \ | |
-p 3478:3478/udp \ | |
-p 10001:10001/udp \ | |
-e TZ=$(TZ) \ | |
-e RUNAS_UID0=false \ | |
--volume=$(DATA):/unifi/data \ | |
--volume=$(LOGS):/unifi/log \ | |
--name $(NAME) \ | |
$(IMAGE) | |
.PHONY: stop | |
stop: | |
docker container stop $(NAME) | |
.PHONY: logs | |
logs: | |
docker logs -f $(NAME) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment