diff options
-rw-r--r-- | unifi/.dockerignore | 1 | ||||
-rw-r--r-- | unifi/Dockerfile | 10 | ||||
-rw-r--r-- | unifi/Makefile | 32 |
3 files changed, 43 insertions, 0 deletions
diff --git a/unifi/.dockerignore b/unifi/.dockerignore new file mode 100644 index 0000000..f3c7a7c --- /dev/null +++ b/unifi/.dockerignore | |||
@@ -0,0 +1 @@ | |||
Makefile | |||
diff --git a/unifi/Dockerfile b/unifi/Dockerfile new file mode 100644 index 0000000..1fb6aa2 --- /dev/null +++ b/unifi/Dockerfile | |||
@@ -0,0 +1,10 @@ | |||
1 | FROM alpine:edge | ||
2 | LABEL maintainer="Mike Crute <mike@crute.us>" | ||
3 | |||
4 | RUN set -euxo pipefail; \ | ||
5 | wget -O /etc/apk/keys/mcrute-5a3eecec.rsa.pub https://packages.crute.me/mcrute-5a3eecec.rsa.pub; \ | ||
6 | echo "https://packages.crute.me/alpine/edge/main" >> /etc/apk/repositories; \ | ||
7 | apk --no-cache add unifi-controller; | ||
8 | |||
9 | STOPSIGNAL SIGTERM | ||
10 | ENTRYPOINT [ "/usr/bin/simplevisor", "-config=/simplevisor.json" ] | ||
diff --git a/unifi/Makefile b/unifi/Makefile new file mode 100644 index 0000000..81011c7 --- /dev/null +++ b/unifi/Makefile | |||
@@ -0,0 +1,32 @@ | |||
1 | VERSION=8.0.7 | ||
2 | VERSION_TAG=$(VERSION)-0 | ||
3 | IMAGE=docker.crute.me/unifi:$(VERSION_TAG) | ||
4 | LATEST=$(subst :$(VERSION_TAG),,$(IMAGE)):latest | ||
5 | |||
6 | all: | ||
7 | docker pull alpine:latest | ||
8 | docker build \ | ||
9 | --no-cache \ | ||
10 | -t $(IMAGE) . | ||
11 | |||
12 | all-no-cache: | ||
13 | docker build \ | ||
14 | --no-cache \ | ||
15 | --build-arg=deb_version=$(DEB_VERSION) \ | ||
16 | --build-arg=checksum=$(CHECKSUM) \ | ||
17 | -t $(IMAGE) . | ||
18 | |||
19 | run: | ||
20 | docker run -d \ | ||
21 | -e UNIFI_UID=1001 \ | ||
22 | -e UNIFI_GID=1001 \ | ||
23 | -p 8080:8080 \ | ||
24 | -p 8443:8443 \ | ||
25 | $(IMAGE) | ||
26 | |||
27 | publish: | ||
28 | docker push $(IMAGE) | ||
29 | |||
30 | publish-prod: | ||
31 | docker tag $(IMAGE) $(LATEST) | ||
32 | docker push $(LATEST) | ||