aboutsummaryrefslogtreecommitdiff
path: root/unifi/Makefile
blob: 83e2fc96ba8ee430e4fa968d6a8a15cad0b02efc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
VERSION=7.2.91-85c367a4aa
IMAGE=docker.crute.me/unifi:$(VERSION)
LATEST=$(subst :$(VERSION),,$(IMAGE)):latest

DEB_LOCATION="https://dl.ui.com/unifi/$(VERSION)/unifi_sysvinit_all.deb"
CHECKSUM_LINE="d33e7b5a838a4c301ca545910e7119ba62bda80202259655191ced1e482cecde *unifi_sysvinit_all.deb"

all:
	docker pull alpine:latest
	docker build \
		--no-cache \
		--build-arg=deb_location=$(DEB_LOCATION) \
		--build-arg=checksum_line=$(CHECKSUM_LINE) \
		-t $(IMAGE) .

all-no-cache:
	docker build \
		--no-cache \
		--build-arg=deb_location=$(DEB_LOCATION) \
		--build-arg=checksum_line=$(CHECKSUM_LINE) \
		-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)