diff options
author | Mike Crute <mike@crute.us> | 2019-09-17 23:38:50 +0000 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2019-09-17 23:38:50 +0000 |
commit | 5fe40adb19d4ed17d11c474e71fef67c1cf96a65 (patch) | |
tree | a296884e48f00d2104c03ce44cd18e29a2e34b99 /unifi | |
parent | 5e0722d23ad1d5604f6d63b6d010927e22157292 (diff) | |
download | dockerfiles-5fe40adb19d4ed17d11c474e71fef67c1cf96a65.tar.bz2 dockerfiles-5fe40adb19d4ed17d11c474e71fef67c1cf96a65.tar.xz dockerfiles-5fe40adb19d4ed17d11c474e71fef67c1cf96a65.zip |
Update Unifi to 5.11.39
Diffstat (limited to 'unifi')
-rw-r--r-- | unifi/Dockerfile | 9 | ||||
-rw-r--r-- | unifi/Makefile | 11 |
2 files changed, 10 insertions, 10 deletions
diff --git a/unifi/Dockerfile b/unifi/Dockerfile index dbc643d..607df4f 100644 --- a/unifi/Dockerfile +++ b/unifi/Dockerfile | |||
@@ -2,14 +2,14 @@ FROM alpine:3.7 | |||
2 | LABEL maintainer="Mike Crute <mike@crute.us>" | 2 | LABEL maintainer="Mike Crute <mike@crute.us>" |
3 | 3 | ||
4 | ARG deb_location | 4 | ARG deb_location |
5 | ARG checksum_file | 5 | ARG checksum_line |
6 | 6 | ||
7 | ADD log4j.properties /tmp/ | 7 | ADD log4j.properties /tmp/ |
8 | 8 | ||
9 | RUN set -euxo pipefail; \ | 9 | RUN set -euxo pipefail; \ |
10 | # Validate required arguments were passed | 10 | # Validate required arguments were passed |
11 | test -z "${deb_location}" && { echo -e "\033[31mMissing build parameter 'deb_location'\033[39m"; exit 1; }; \ | 11 | test -z "${deb_location}" && { echo -e "\033[31mMissing build parameter 'deb_location'\033[39m"; exit 1; }; \ |
12 | test -z "${checksum_file}" && { echo -e "\033[31mMissing build parameter 'checksum_file'\033[39m"; exit 1; }; \ | 12 | test -z "${checksum_line}" && { echo -e "\033[31mMissing build parameter 'checksum_line'\033[39m"; exit 1; }; \ |
13 | \ | 13 | \ |
14 | # Install build and run dependencies | 14 | # Install build and run dependencies |
15 | apk add --no-cache --virtual .build-deps \ | 15 | apk add --no-cache --virtual .build-deps \ |
@@ -19,16 +19,17 @@ RUN set -euxo pipefail; \ | |||
19 | && apk add --no-cache \ | 19 | && apk add --no-cache \ |
20 | dumb-init \ | 20 | dumb-init \ |
21 | java-snappy \ | 21 | java-snappy \ |
22 | libcap \ | ||
22 | mongodb \ | 23 | mongodb \ |
23 | mongodb-tools \ | 24 | mongodb-tools \ |
24 | libcap \ | 25 | nss \ |
25 | openjdk8-jre-base \ | 26 | openjdk8-jre-base \ |
26 | su-exec \ | 27 | su-exec \ |
27 | \ | 28 | \ |
28 | # Fetch the Unifi package and validate the checksum before unpacking | 29 | # Fetch the Unifi package and validate the checksum before unpacking |
29 | && cd /tmp \ | 30 | && cd /tmp \ |
30 | && curl -sO "$deb_location" \ | 31 | && curl -sO "$deb_location" \ |
31 | && curl -s "${checksum_file}" | sed -En 's/^SHA256\(([^\)]+)\)= (.*)/\2 *\1/gp' | grep 'unifi_sysvinit_all.deb' > checksums.txt \ | 32 | && echo "${checksum_line}" > checksums.txt \ |
32 | && sha256sum -sc checksums.txt \ | 33 | && sha256sum -sc checksums.txt \ |
33 | \ | 34 | \ |
34 | # Unpack the debian package and "install" it | 35 | # Unpack the debian package and "install" it |
diff --git a/unifi/Makefile b/unifi/Makefile index caf1682..f6c9585 100644 --- a/unifi/Makefile +++ b/unifi/Makefile | |||
@@ -1,23 +1,22 @@ | |||
1 | BLOG_ID=383 | 1 | VERSION=5.11.39 |
2 | VERSION=5.10.20 | ||
3 | IMAGE=docker.crute.me/unifi:$(VERSION) | 2 | IMAGE=docker.crute.me/unifi:$(VERSION) |
4 | LATEST=$(subst :$(VERSION),,$(IMAGE)):latest | 3 | LATEST=$(subst :$(VERSION),,$(IMAGE)):latest |
5 | 4 | ||
6 | DEB_LOCATION="https://dl.ubnt.com/unifi/$(VERSION)/unifi_sysvinit_all.deb" | 5 | DEB_LOCATION="https://dl.ui.com/unifi/$(VERSION)/unifi_sysvinit_all.deb" |
7 | CHECKSUM_FILE="https://community.ubnt.com/ubnt/attachments/ubnt/Blog_UniFi/$(BLOG_ID)/1/checksums.txt" | 6 | CHECKSUM_LINE="d2736dababcf96596a2c9ad82ee2fcbd02ee4d3a864284175b43f5afdab62f6c *unifi_sysvinit_all.deb" |
8 | 7 | ||
9 | all: | 8 | all: |
10 | docker pull alpine:latest | 9 | docker pull alpine:latest |
11 | docker build \ | 10 | docker build \ |
12 | --build-arg=deb_location=$(DEB_LOCATION) \ | 11 | --build-arg=deb_location=$(DEB_LOCATION) \ |
13 | --build-arg=checksum_file=$(CHECKSUM_FILE) \ | 12 | --build-arg=checksum_line=$(CHECKSUM_LINE) \ |
14 | -t $(IMAGE) . | 13 | -t $(IMAGE) . |
15 | 14 | ||
16 | all-no-cache: | 15 | all-no-cache: |
17 | docker build \ | 16 | docker build \ |
18 | --no-cache \ | 17 | --no-cache \ |
19 | --build-arg=deb_location=$(DEB_LOCATION) \ | 18 | --build-arg=deb_location=$(DEB_LOCATION) \ |
20 | --build-arg=checksum_file=$(CHECKSUM_FILE) \ | 19 | --build-arg=checksum_line=$(CHECKSUM_LINE) \ |
21 | -t $(IMAGE) . | 20 | -t $(IMAGE) . |
22 | 21 | ||
23 | run: | 22 | run: |