From 55e06d25214104cfde12646d747929b2a9c13af0 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Tue, 21 Nov 2023 21:40:18 -0800 Subject: Add new unifi --- unifi/.dockerignore | 1 + unifi/Dockerfile | 10 ++++++++++ unifi/Makefile | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 unifi/.dockerignore create mode 100644 unifi/Dockerfile create mode 100644 unifi/Makefile 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 @@ +FROM alpine:edge +LABEL maintainer="Mike Crute " + +RUN set -euxo pipefail; \ + wget -O /etc/apk/keys/mcrute-5a3eecec.rsa.pub https://packages.crute.me/mcrute-5a3eecec.rsa.pub; \ + echo "https://packages.crute.me/alpine/edge/main" >> /etc/apk/repositories; \ + apk --no-cache add unifi-controller; + +STOPSIGNAL SIGTERM +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 @@ +VERSION=8.0.7 +VERSION_TAG=$(VERSION)-0 +IMAGE=docker.crute.me/unifi:$(VERSION_TAG) +LATEST=$(subst :$(VERSION_TAG),,$(IMAGE)):latest + +all: + docker pull alpine:latest + docker build \ + --no-cache \ + -t $(IMAGE) . + +all-no-cache: + docker build \ + --no-cache \ + --build-arg=deb_version=$(DEB_VERSION) \ + --build-arg=checksum=$(CHECKSUM) \ + -t $(IMAGE) . + +run: + docker run -d \ + -e UNIFI_UID=1001 \ + -e UNIFI_GID=1001 \ + -p 8080:8080 \ + -p 8443:8443 \ + $(IMAGE) + +publish: + docker push $(IMAGE) + +publish-prod: + docker tag $(IMAGE) $(LATEST) + docker push $(LATEST) -- cgit v1.2.3