Skip to content

Commit

Permalink
Update 8.0/official to v8.0.28, Tag 8.0.28 release
Browse files Browse the repository at this point in the history
  • Loading branch information
goofball222 committed Jan 25, 2024
1 parent a397e53 commit 8752e9e
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 70 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
${{ github.repository }}
ghcr.io/${{ github.repository }}
tags: |
type=raw,latest
type=raw,8.0
type=raw,latest-debian
type=raw,8.0-debian
labels: |
org.opencontainers.image.vendor=The Goofball - [email protected]
org.opencontainers.image.title=UniFi Controller
Expand All @@ -61,6 +61,8 @@ jobs:
${{ github.repository }}
ghcr.io/${{ github.repository }}
tags: |
type=raw,latest
type=raw,8.0
type=raw,latest-ubuntu
type=raw,8.0-ubuntu
labels: |
Expand Down Expand Up @@ -103,7 +105,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: ./8.0/official
file: ./8.0/official/Dockerfile
file: ./8.0/official/Dockerfile.debian
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-debian.outputs.tags }}
Expand All @@ -114,7 +116,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: ./8.0/official
file: ./8.0/official/Dockerfile.ubuntu
file: ./8.0/official/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-ubuntu.outputs.tags }}
Expand Down
22 changes: 7 additions & 15 deletions 8.0/official/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM ubuntu:20.04

ARG BUILD_DATE
ARG VCS_REF
Expand All @@ -9,7 +9,7 @@ LABEL \
org.opencontainers.image.url="https://github.com/goofball222/unifi" \
org.opencontainers.image.title="UniFi Controller" \
org.opencontainers.image.description="UniFi Controller" \
org.opencontainers.image.version=${VERSION}-Debian \
org.opencontainers.image.version=${VERSION}-Ubuntu \
org.opencontainers.image.source="https://github.com/goofball222/unifi" \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.created=${BUILD_DATE} \
Expand All @@ -34,27 +34,19 @@ COPY root /
RUN set -x \
&& groupadd -r unifi -g $PGID \
&& useradd --no-log-init -r -u $PUID -g $PGID unifi \
&& mkdir -p /usr/share/man/man1 \
&& apt-get -qqy update \
&& apt-get -qqy install apt-utils \
&& apt-get -qqy --no-install-recommends install \
dirmngr gnupg2 > /dev/null \
&& apt-get -qqy --no-install-recommends install \
binutils curl gosu \
binutils curl dirmngr gosu \
libcap2 libcap2-bin procps > /dev/null \
&& apt-get -qqy --no-install-recommends install \
ca-certificates-java > /dev/null \
ca-certificates-java openjdk-17-jre-headless > /dev/null \
&& apt-get -qqy --no-install-recommends install \
openjdk-17-jre-headless > /dev/null \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" \
> /etc/apt/sources.list.d/mongodb-org.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& apt-get -qqy --allow-insecure-repositories update \
&& apt-get -qqy --no-install-recommends --allow-unauthenticated install \
mongodb-org-server > /dev/null \
mongodb-server-core > /dev/null \
&& rm -rf /usr/bin/mongos \
&& curl -sSL https://dl.ui.com/unifi/${VERSION}/unifi_sysvinit_all.deb -o /tmp/unifi-${VERSION}.deb \
&& apt-get -qqy purge \
apt-utils dirmngr gnupg2 > /dev/null \
dirmngr > /dev/null \
&& apt-get -qqy autoremove --purge > /dev/null \
&& apt-get -qqy clean autoclean > /dev/null \
&& dpkg --force-all -i /tmp/unifi-${VERSION}.deb \
Expand Down
22 changes: 15 additions & 7 deletions 8.0/official/Dockerfile.ubuntu → 8.0/official/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM debian:bullseye-slim

ARG BUILD_DATE
ARG VCS_REF
Expand All @@ -9,7 +9,7 @@ LABEL \
org.opencontainers.image.url="https://github.com/goofball222/unifi" \
org.opencontainers.image.title="UniFi Controller" \
org.opencontainers.image.description="UniFi Controller" \
org.opencontainers.image.version=${VERSION}-Ubuntu \
org.opencontainers.image.version=${VERSION}-Debian \
org.opencontainers.image.source="https://github.com/goofball222/unifi" \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.created=${BUILD_DATE} \
Expand All @@ -34,19 +34,27 @@ COPY root /
RUN set -x \
&& groupadd -r unifi -g $PGID \
&& useradd --no-log-init -r -u $PUID -g $PGID unifi \
&& mkdir -p /usr/share/man/man1 \
&& apt-get -qqy update \
&& apt-get -qqy install apt-utils \
&& apt-get -qqy --no-install-recommends install \
binutils curl dirmngr gosu \
dirmngr gnupg2 > /dev/null \
&& apt-get -qqy --no-install-recommends install \
binutils curl gosu \
libcap2 libcap2-bin procps > /dev/null \
&& apt-get -qqy --no-install-recommends install \
ca-certificates-java openjdk-17-jre-headless > /dev/null \
ca-certificates-java > /dev/null \
&& apt-get -qqy --no-install-recommends install \
mongodb-server-core > /dev/null \
&& rm -rf /usr/bin/mongos \
openjdk-17-jre-headless > /dev/null \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" \
> /etc/apt/sources.list.d/mongodb-org.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& apt-get -qqy --allow-insecure-repositories update \
&& apt-get -qqy --no-install-recommends --allow-unauthenticated install \
mongodb-org-server > /dev/null \
&& curl -sSL https://dl.ui.com/unifi/${VERSION}/unifi_sysvinit_all.deb -o /tmp/unifi-${VERSION}.deb \
&& apt-get -qqy purge \
dirmngr > /dev/null \
apt-utils dirmngr gnupg2 > /dev/null \
&& apt-get -qqy autoremove --purge > /dev/null \
&& apt-get -qqy clean autoclean > /dev/null \
&& dpkg --force-all -i /tmp/unifi-${VERSION}.deb \
Expand Down
2 changes: 1 addition & 1 deletion 8.0/official/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.26
8.0.28
7 changes: 5 additions & 2 deletions 8.0/official/root/usr/local/bin/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# docker-entrypoint.sh script for UniFi Docker container
# License: Apache-2.0
# Github: https://github.com/goofball222/unifi
SCRIPT_VERSION="1.1.0"
# Last updated date: 2023-07-17
SCRIPT_VERSION="1.1.1"
# Last updated date: 2024-01-18

set -Eeuo pipefail

Expand All @@ -20,6 +20,9 @@ DATADIR=${BASEDIR}/data
LOGDIR=${BASEDIR}/logs
RUNDIR=${BASEDIR}/run

LOGSTDOUT=${LOGSTDOUT:-"true"}
READENV=${READENV:-"true"}

f_log "INFO - Entrypoint script version ${SCRIPT_VERSION}"
f_log "INFO - Entrypoint functions version ${ENTRYPOINT_FUNCTIONS_VERSION}"

Expand Down
12 changes: 6 additions & 6 deletions 8.0/official/root/usr/local/bin/entrypoint-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# entrypoint-functions.sh script for UniFi Docker container
# License: Apache-2.0
# Github: https://github.com/goofball222/unifi
ENTRYPOINT_FUNCTIONS_VERSION="1.0.8"
# Last updated date: 2022-09-08
ENTRYPOINT_FUNCTIONS_VERSION="1.1.0"
# Last updated date: 2024-01-18

f_bindpriv() {
JAVABIN=$(readlink -f /usr/bin/java)
Expand Down Expand Up @@ -155,15 +155,15 @@ f_sysprop() {
else
f_log "INFO - Existing '${DATADIR}/system.properties' found, ensuring container mode options are enabled"
if ! grep -q "unifi.logStdout" "${DATADIR}/system.properties"; then
echo "unifi.logStdout=true" >> ${DATADIR}/system.properties
echo "unifi.logStdout=${LOGSTDOUT}" >> ${DATADIR}/system.properties
else
sed -i '/unifi.logStdout/c\unifi.logStdout=true' ${DATADIR}/system.properties
sed -i "/unifi.logStdout/c\unifi.logStdout=${LOGSTDOUT}" ${DATADIR}/system.properties
fi

if ! grep -q "unifi.config.readEnv" "${DATADIR}/system.properties"; then
echo "unifi.config.readEnv=true" >> ${DATADIR}/system.properties
echo "unifi.config.readEnv=${READENV}" >> ${DATADIR}/system.properties
else
sed -i '/unifi.config.readEnv/c\unifi.config.readEnv=true' ${DATADIR}/system.properties
sed -i "/unifi.config.readEnv/c\unifi.config.readEnv=${READENV}" ${DATADIR}/system.properties
fi
fi
}
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
* **2024-01-25:**
* Update 8.0/official to v[8.0.28](https://community.ui.com/releases/UniFi-Network-Application-8-0-28/f7492865-778d-4539-aaf8-3fb09c4279b0)
* Tag 8.0.28 release
* This release changes the default/latest image tag from Debian-based to Ubuntu-based - #132
---
* **2024-01-18:**
* Update 8.0/beta entrypoint and functions to allow setting unifi.logStdout (Issue #135) and unifi.config.readEnv via env
* Add LOGSTDOUT & READENV env vars for the above, default to true if unset.
* ToDo: add documentation on these to README.md whenever current beta is moved to official.
* ~~ToDo: add documentation on these to README.md whenever current beta is moved to official.~~
---
* **2024-01-12:**
* Update 8.0/beta to v[8.0.28](https://community.ui.com/releases/UniFi-Network-Application-8-0-28/c1d84a2d-dc0b-438a-b0b4-e3e19011e619)
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
## Docker tags:
| Tag | UniFi Version | Description | Release Date |
| --- | :---: | --- | :---: |
| [8.0, 8.0-alpine, 8.0-ubuntu, latest, latest-alpine, latest-ubuntu](https://github.com/goofball222/unifi/blob/main/8.0/official/Dockerfile) | [8.0.26](https://community.ui.com/releases/UniFi-Network-Application-8-0-26/cd9303a8-f26a-44e2-94d8-a3cac8606726) | UniFi Network Application official release | 2024-01-05 |
| [8.0, 8.0-alpine, 8.0-ubuntu, latest, latest-alpine, latest-ubuntu](https://github.com/goofball222/unifi/blob/main/8.0/official/Dockerfile) | [8.0.28](https://community.ui.com/releases/UniFi-Network-Application-8-0-28/f7492865-778d-4539-aaf8-3fb09c4279b0) | UniFi Network Application official release | 2024-01-25 |
| [8.0-beta, 8.0-alpine-beta, 8.0-debian-beta, 8.0-ubuntu-beta, latest-beta, latest-alpine-beta, latest-debian-beta, latest-ubuntu-beta](https://github.com/goofball222/unifi/blob/main/8.0/beta/Dockerfile) | [8.0.28](https://community.ui.com/releases/UniFi-Network-Application-8-0-28/c1d84a2d-dc0b-438a-b0b4-e3e19011e619) | UniFi Network Application beta/release candidate | 2024-01-12 |
| [7.5, 7.5-alpine, 7.5-ubuntu](https://github.com/goofball222/unifi/blob/main/7.5/official/Dockerfile) | [7.5.187](https://community.ui.com/releases/UniFi-Network-Application-7-5-187/408b64c5-a485-4a37-843c-31e87140be64) | UniFi Network Application official release | 2023-10-17 |
| [7.5-beta, 7.5-alpine-beta, 7.5-ubuntu-beta](https://github.com/goofball222/unifi/blob/main/7.5/beta/Dockerfile) | [7.5.187](https://community.ui.com/releases/UniFi-Network-Application-7-5-187/e6faa0fa-ebf2-497e-9e42-901a1840d206) | UniFi Network Application beta/release candidate | 2023-10-05 |
| [8.0.26](https://github.com/goofball222/unifi/releases/tag/8.0.26) | [8.0.26](https://community.ui.com/releases/UniFi-Network-Application-8-0-26/cd9303a8-f26a-44e2-94d8-a3cac8606726) | Static official release tag/image | 2024-01-05 |
| [8.0.28](https://github.com/goofball222/unifi/releases/tag/8.0.28) | [8.0.28](https://community.ui.com/releases/UniFi-Network-Application-8-0-28/f7492865-778d-4539-aaf8-3fb09c4279b0) | Static official release tag/image | 2024-01-25 |
| [7.5.187](https://github.com/goofball222/unifi/releases/tag/7.5.187) | [7.5.187](https://community.ui.com/releases/UniFi-Network-Application-7-5-187/408b64c5-a485-4a37-843c-31e87140be64) | Static official release tag/image | 2023-10-17 |
| [7.4.162](https://github.com/goofball222/unifi/releases/tag/7.4.162) | [7.4.162](https://community.ui.com/releases/UniFi-Network-Application-7-4-162/50b4b930-631e-4ada-87c4-0b4ea5fb26a7) | Static official release tag/image | 2023-07-03 |
| [7.3.83](https://github.com/goofball222/unifi/releases/tag/7.3.83) | [7.3.83](https://community.ui.com/releases/UniFi-Network-Application-7-3-83/88f5ff3f-4c13-45e2-b57e-ad04b4140528) | Static official release tag/image | 2023-01-30 |
Expand Down Expand Up @@ -212,8 +212,10 @@ Copy the following to both services in the docker-compose.yml file under the com
| `JVM_EXTRA_OPTS` | ***unset*** | Any additional custom run flags for the container Java process |
| `JVM_INIT_HEAP_SIZE` | ***unset*** | Sets the start and min memory size for the container Java process (-Xms) |
| `JVM_MAX_HEAP_SIZE` | ***1024M*** | Sets the max memory size for the container Java process (-Xmx) |
| `LOGSTDOUT` | ***true*** | Set to *false* to disable the UniFi process log output to STDOUT. System will still output to log volume files if configured. |
| `PGID` | ***999*** | Specifies the GID for the container internal unifi group (used for file ownership) |
| `PUID` | ***999*** | Specifies the UID for the container internal unifi user (used for process and file ownership) |
| `READENV` | ***true*** | Set to *false* to disable environment variables conversion to UniFi system.properties settings. |
| `RUN_CHOWN` | ***true*** | Set to *false* to disable the container automatic `chown` at startup. Speeds up startup process on overlay2 Docker hosts. **NB/IMPORTANT:** It's critical that you insure directory/data permissions on all mapped volumes are correct before disabling this or UniFi and/or Mongo will not start. |
| `RUNAS_UID0` | ***false*** | Set to *true* to force the container to run the Java/Mongo processes as UID=0 (root) - workaround for `setcap` AUFS missing xargs failure - **NB/IMPORTANT:** running with this set to "true" is insecure |

Expand All @@ -226,7 +228,7 @@ Recommended UniFi system.properties converted environment variables to externali
| `STATDB_MONGO_URI` | ***mongodb://mongo:27017/unifi_stat*** | This sets the URI that UniFi should connect to for the statistics database |
| `UNIFI_DB_NAME` | ***unifi*** | Sets a database name that can be connected and managed on the external Mongo DB server, must match with the URI variables (IE: unifi, unifi_stat = unifi). |

**NB/IMPORTANT:** Although I've been running my own deployments with an external DB for a year or more without issue with these settings externalizing the DB, just like running the app itself in a Docker container, is considered experimental and totally unsupported by UBNT. Full documentation for an external DB setup is outside the scope of this README and is left as an exercise for the interested reader. Additional information available on the [UBNT forums in this post](https://community.ubnt.com/t5/UniFi-Wireless/External-MongoDB-Server/m-p/1711073/highlight/true#M188357) and in the PDF post linked below.
**NB/IMPORTANT:** Although I've been running my own deployments with an external DB without issue with these settings externalizing the DB, just like running the app itself in a Docker container, is considered experimental and totally unsupported by UBNT. Full documentation for an external DB setup is outside the scope of this README and is left as an exercise for the interested reader. Additional information available on the [UBNT forums in this post](https://community.ubnt.com/t5/UniFi-Wireless/External-MongoDB-Server/m-p/1711073/highlight/true#M188357) and in the PDF post linked below.

Additional UniFi [system.properties](https://help.ubnt.com/hc/en-us/articles/205202580-UniFi-system-properties-File-Explanation) config file settings can be passed to the container as -e/--env/environment flags at runtime [(more detail and a PDF with UBNT examples here)](https://community.ubnt.com/t5/UniFi-Wireless-Beta/Unifi-Controller-High-Availability/m-p/1801933/highlight/true#M43494). Envrionment variables must be in ALL CAPS and replace "." with "_". -- **IE:**

Expand Down
22 changes: 7 additions & 15 deletions release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM ubuntu:20.04

ARG BUILD_DATE
ARG VCS_REF
Expand All @@ -9,7 +9,7 @@ LABEL \
org.opencontainers.image.url="https://github.com/goofball222/unifi" \
org.opencontainers.image.title="UniFi Controller" \
org.opencontainers.image.description="UniFi Controller" \
org.opencontainers.image.version=${VERSION}-Debian \
org.opencontainers.image.version=${VERSION}-Ubuntu \
org.opencontainers.image.source="https://github.com/goofball222/unifi" \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.created=${BUILD_DATE} \
Expand All @@ -34,27 +34,19 @@ COPY root /
RUN set -x \
&& groupadd -r unifi -g $PGID \
&& useradd --no-log-init -r -u $PUID -g $PGID unifi \
&& mkdir -p /usr/share/man/man1 \
&& apt-get -qqy update \
&& apt-get -qqy install apt-utils \
&& apt-get -qqy --no-install-recommends install \
dirmngr gnupg2 > /dev/null \
&& apt-get -qqy --no-install-recommends install \
binutils curl gosu \
binutils curl dirmngr gosu \
libcap2 libcap2-bin procps > /dev/null \
&& apt-get -qqy --no-install-recommends install \
ca-certificates-java > /dev/null \
ca-certificates-java openjdk-17-jre-headless > /dev/null \
&& apt-get -qqy --no-install-recommends install \
openjdk-17-jre-headless > /dev/null \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" \
> /etc/apt/sources.list.d/mongodb-org.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& apt-get -qqy --allow-insecure-repositories update \
&& apt-get -qqy --no-install-recommends --allow-unauthenticated install \
mongodb-org-server > /dev/null \
mongodb-server-core > /dev/null \
&& rm -rf /usr/bin/mongos \
&& curl -sSL https://dl.ui.com/unifi/${VERSION}/unifi_sysvinit_all.deb -o /tmp/unifi-${VERSION}.deb \
&& apt-get -qqy purge \
apt-utils dirmngr gnupg2 > /dev/null \
dirmngr > /dev/null \
&& apt-get -qqy autoremove --purge > /dev/null \
&& apt-get -qqy clean autoclean > /dev/null \
&& dpkg --force-all -i /tmp/unifi-${VERSION}.deb \
Expand Down
22 changes: 15 additions & 7 deletions release/Dockerfile.ubuntu → release/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM debian:bullseye-slim

ARG BUILD_DATE
ARG VCS_REF
Expand All @@ -9,7 +9,7 @@ LABEL \
org.opencontainers.image.url="https://github.com/goofball222/unifi" \
org.opencontainers.image.title="UniFi Controller" \
org.opencontainers.image.description="UniFi Controller" \
org.opencontainers.image.version=${VERSION}-Ubuntu \
org.opencontainers.image.version=${VERSION}-Debian \
org.opencontainers.image.source="https://github.com/goofball222/unifi" \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.created=${BUILD_DATE} \
Expand All @@ -34,19 +34,27 @@ COPY root /
RUN set -x \
&& groupadd -r unifi -g $PGID \
&& useradd --no-log-init -r -u $PUID -g $PGID unifi \
&& mkdir -p /usr/share/man/man1 \
&& apt-get -qqy update \
&& apt-get -qqy install apt-utils \
&& apt-get -qqy --no-install-recommends install \
binutils curl dirmngr gosu \
dirmngr gnupg2 > /dev/null \
&& apt-get -qqy --no-install-recommends install \
binutils curl gosu \
libcap2 libcap2-bin procps > /dev/null \
&& apt-get -qqy --no-install-recommends install \
ca-certificates-java openjdk-17-jre-headless > /dev/null \
ca-certificates-java > /dev/null \
&& apt-get -qqy --no-install-recommends install \
mongodb-server-core > /dev/null \
&& rm -rf /usr/bin/mongos \
openjdk-17-jre-headless > /dev/null \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" \
> /etc/apt/sources.list.d/mongodb-org.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& apt-get -qqy --allow-insecure-repositories update \
&& apt-get -qqy --no-install-recommends --allow-unauthenticated install \
mongodb-org-server > /dev/null \
&& curl -sSL https://dl.ui.com/unifi/${VERSION}/unifi_sysvinit_all.deb -o /tmp/unifi-${VERSION}.deb \
&& apt-get -qqy purge \
dirmngr > /dev/null \
apt-utils dirmngr gnupg2 > /dev/null \
&& apt-get -qqy autoremove --purge > /dev/null \
&& apt-get -qqy clean autoclean > /dev/null \
&& dpkg --force-all -i /tmp/unifi-${VERSION}.deb \
Expand Down
2 changes: 1 addition & 1 deletion release/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.26
8.0.28
Loading

0 comments on commit 8752e9e

Please sign in to comment.