Skip to content

Commit

Permalink
Update official release to v8.2.93 (#141)
Browse files Browse the repository at this point in the history
* Create 8.2/official - v8.2.93, Promote 8.2 official to latest, Tag 8.2.93 release

---------

Co-authored-by: goofball222 <[email protected]>
  • Loading branch information
fharbe and goofball222 authored Jun 6, 2024
1 parent 91b9d0d commit 83551f5
Show file tree
Hide file tree
Showing 21 changed files with 1,142 additions and 14 deletions.
120 changes: 120 additions & 0 deletions .github/workflows/build-8.1-official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Build 8.1 Official

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 8.1/official/**
- .github/workflows/build-8.1-official.yml

jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up dynamic build ARGs
id: getargs
run: echo "version=$(cat ./8.1/official/VERSION)" >> $GITHUB_OUTPUT
-
name: Set up Docker metadata for Alpine
id: meta-alpine
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
tags: |
type=raw,8.1-alpine
labels: |
org.opencontainers.image.vendor=The Goofball - [email protected]
org.opencontainers.image.title=UniFi Controller
org.opencontainers.image.description=UniFi Controller
org.opencontainers.image.version=${{ steps.getargs.outputs.version }}-Alpine
-
name: Set up Docker metadata for Debian
id: meta-debian
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
tags: |
type=raw,8.1-debian
labels: |
org.opencontainers.image.vendor=The Goofball - [email protected]
org.opencontainers.image.title=UniFi Controller
org.opencontainers.image.description=UniFi Controller
org.opencontainers.image.version=${{ steps.getargs.outputs.version }}-Debian
-
name: Set up Docker metadata for Ubuntu
id: meta-ubuntu
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
tags: |
type=raw,8.1
type=raw,8.1-ubuntu
labels: |
org.opencontainers.image.vendor=The Goofball - [email protected]
org.opencontainers.image.title=UniFi Controller
org.opencontainers.image.description=UniFi Controller
org.opencontainers.image.version=${{ steps.getargs.outputs.version }}-Ubuntu
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push Alpine Docker image
uses: docker/build-push-action@v5
with:
context: ./8.1/official
file: ./8.1/official/Dockerfile.alpine
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-alpine.outputs.tags }}
labels: ${{ steps.meta-alpine.outputs.labels }}
build-args: VERSION=${{ steps.getargs.outputs.version }}
-
name: Build and push Debian Docker image
uses: docker/build-push-action@v5
with:
context: ./8.1/official
file: ./8.1/official/Dockerfile.debian
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-debian.outputs.tags }}
labels: ${{ steps.meta-debian.outputs.labels }}
build-args: VERSION=${{ steps.getargs.outputs.version }}
-
name: Build and push Ubuntu Docker image
uses: docker/build-push-action@v5
with:
context: ./8.1/official
file: ./8.1/official/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-ubuntu.outputs.tags }}
labels: ${{ steps.meta-ubuntu.outputs.labels }}
build-args: VERSION=${{ steps.getargs.outputs.version }}
24 changes: 12 additions & 12 deletions .github/workflows/build-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- main
paths:
- 8.1/official/**
- 8.2/official/**
- .github/workflows/build-latest.yml

jobs:
Expand All @@ -19,7 +19,7 @@ jobs:
-
name: Set up dynamic build ARGs
id: getargs
run: echo "version=$(cat ./8.1/official/VERSION)" >> $GITHUB_OUTPUT
run: echo "version=$(cat ./8.2/official/VERSION)" >> $GITHUB_OUTPUT
-
name: Set up Docker metadata for Alpine
id: meta-alpine
Expand All @@ -30,7 +30,7 @@ jobs:
ghcr.io/${{ github.repository }}
tags: |
type=raw,latest-alpine
type=raw,8.1-alpine
type=raw,8.2-alpine
labels: |
org.opencontainers.image.vendor=The Goofball - [email protected]
org.opencontainers.image.title=UniFi Controller
Expand All @@ -46,7 +46,7 @@ jobs:
ghcr.io/${{ github.repository }}
tags: |
type=raw,latest-debian
type=raw,8.1-debian
type=raw,8.2-debian
labels: |
org.opencontainers.image.vendor=The Goofball - [email protected]
org.opencontainers.image.title=UniFi Controller
Expand All @@ -62,9 +62,9 @@ jobs:
ghcr.io/${{ github.repository }}
tags: |
type=raw,latest
type=raw,8.1
type=raw,8.2
type=raw,latest-ubuntu
type=raw,8.1-ubuntu
type=raw,8.2-ubuntu
labels: |
org.opencontainers.image.vendor=The Goofball - [email protected]
org.opencontainers.image.title=UniFi Controller
Expand Down Expand Up @@ -93,8 +93,8 @@ jobs:
name: Build and push Alpine Docker image
uses: docker/build-push-action@v5
with:
context: ./8.1/official
file: ./8.1/official/Dockerfile.alpine
context: ./8.2/official
file: ./8.2/official/Dockerfile.alpine
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-alpine.outputs.tags }}
Expand All @@ -104,8 +104,8 @@ jobs:
name: Build and push Debian Docker image
uses: docker/build-push-action@v5
with:
context: ./8.1/official
file: ./8.1/official/Dockerfile.debian
context: ./8.2/official
file: ./8.2/official/Dockerfile.debian
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-debian.outputs.tags }}
Expand All @@ -115,8 +115,8 @@ jobs:
name: Build and push Ubuntu Docker image
uses: docker/build-push-action@v5
with:
context: ./8.1/official
file: ./8.1/official/Dockerfile
context: ./8.2/official
file: ./8.2/official/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-ubuntu.outputs.tags }}
Expand Down
66 changes: 66 additions & 0 deletions 8.2/official/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
FROM ubuntu:20.04

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

LABEL \
org.opencontainers.image.vendor="The Goofball - [email protected]" \
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.source="https://github.com/goofball222/unifi" \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.licenses="Apache-2.0"

ENV \
BIND_PRIV=false \
DEBIAN_FRONTEND=noninteractive \
DEBUG=false \
JVM_EXTRA_OPTS= \
JVM_INIT_HEAP_SIZE= \
JVM_MAX_HEAP_SIZE=1024M \
PGID=999 \
PUID=999 \
RUN_CHOWN=true \
RUNAS_UID0=false

WORKDIR /usr/lib/unifi

COPY root /

RUN set -x \
&& groupadd -r unifi -g $PGID \
&& useradd --no-log-init -r -u $PUID -g $PGID unifi \
&& apt-get -qqy update \
&& apt-get -qqy install apt-utils \
&& apt-get -qqy --no-install-recommends install \
binutils curl dirmngr gosu \
libcap2 libcap2-bin procps > /dev/null \
&& apt-get -qqy --no-install-recommends install \
ca-certificates-java openjdk-17-jre-headless > /dev/null \
&& apt-get -qqy --no-install-recommends install \
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 \
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 \
&& rm -rf data logs run \
&& bash -c 'mkdir -p {data,logs,run,cert}' \
&& chown -R unifi:unifi /usr/lib/unifi \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/*

EXPOSE 3478/udp 6789/tcp 8080/tcp 8443/tcp 8843/tcp 8880/tcp 10001/udp

VOLUME ["/usr/lib/unifi/cert", "/usr/lib/unifi/data", "/usr/lib/unifi/logs"]

HEALTHCHECK --start-period=2m CMD /usr/local/bin/docker-healthcheck.sh

ENTRYPOINT ["docker-entrypoint.sh"]

CMD ["unifi"]
58 changes: 58 additions & 0 deletions 8.2/official/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM alpine:latest

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

LABEL \
org.opencontainers.image.vendor="The Goofball - [email protected]" \
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}-Alpine \
org.opencontainers.image.source="https://github.com/goofball222/unifi" \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.licenses="Apache-2.0"

ENV \
BIND_PRIV=false \
DEBUG=false \
JVM_EXTRA_OPTS= \
JVM_INIT_HEAP_SIZE= \
JVM_MAX_HEAP_SIZE=1024M \
PGID=999 \
PUID=999 \
RUN_CHOWN=true \
RUNAS_UID0=false

WORKDIR /usr/lib/unifi

COPY root /

RUN set -x \
&& delgroup ping \
&& addgroup -g $PGID unifi \
&& adduser -D -G unifi -u $PUID unifi \
&& apk add -q --no-cache \
gcompat libc6-compat \
&& apk add -q --no-cache \
bash binutils coreutils curl libcap \
openjdk17-jre openssl shadow su-exec \
tzdata \
&& curl -sSL https://dl.ui.com/unifi/${VERSION}/UniFi.unix.zip -o /tmp/UniFi.unix.${VERSION}.zip \
&& unzip -q /tmp/UniFi.unix.${VERSION}.zip -d /tmp \
&& mv /tmp/UniFi/* /usr/lib/unifi/ \
&& bash -c 'mkdir -p {data,logs,run,cert}' \
&& chown -R unifi:unifi /usr/lib/unifi \
&& rm -rf /tmp/* /var/tmp/* /var/cache/apk/*

EXPOSE 3478/udp 6789/tcp 8080/tcp 8443/tcp 8843/tcp 8880/tcp 10001/udp

VOLUME ["/usr/lib/unifi/cert", "/usr/lib/unifi/data", "/usr/lib/unifi/logs"]

HEALTHCHECK --start-period=2m CMD /usr/local/bin/docker-healthcheck.sh

ENTRYPOINT ["docker-entrypoint.sh"]

CMD ["unifi"]
60 changes: 60 additions & 0 deletions 8.2/official/Dockerfile.alpine.mongo
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
FROM alpine:latest

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

LABEL \
org.opencontainers.image.vendor="The Goofball - [email protected]" \
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}-Alpine.mongo \
org.opencontainers.image.source="https://github.com/goofball222/unifi" \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.licenses="Apache-2.0"

ENV \
BIND_PRIV=false \
DEBUG=false \
JVM_EXTRA_OPTS= \
JVM_INIT_HEAP_SIZE= \
JVM_MAX_HEAP_SIZE=1024M \
PGID=999 \
PUID=999 \
RUN_CHOWN=true \
RUNAS_UID0=false

WORKDIR /usr/lib/unifi

COPY root /

RUN set -x \
&& delgroup ping \
&& addgroup -g $PGID unifi \
&& adduser -D -G unifi -u $PUID unifi \
&& apk add -q --no-cache \
gcompat libc6-compat \
&& apk add -q --no-cache \
bash binutils coreutils curl libcap \
mongodb openjdk17-jre openssl shadow su-exec \
tzdata \
&& curl -sSL https://dl.ui.com/unifi/${VERSION}/UniFi.unix.zip -o /tmp/UniFi.unix.${VERSION}.zip \
&& unzip -q /tmp/UniFi.unix.${VERSION}.zip -d /tmp \
&& mv /tmp/UniFi/* /usr/lib/unifi/ \
&& bash -c 'mkdir -p {data,logs,run,cert}' \
&& chown -R unifi:unifi /usr/lib/unifi \
&& rm /usr/lib/unifi/bin/mongod \
&& ln -s /usr/bin/mongod /usr/lib/unifi/bin/mongod \
&& rm -rf /tmp/* /var/tmp/* /var/cache/apk/*

EXPOSE 3478/udp 6789/tcp 8080/tcp 8443/tcp 8843/tcp 8880/tcp 10001/udp

VOLUME ["/usr/lib/unifi/cert", "/usr/lib/unifi/data", "/usr/lib/unifi/logs"]

HEALTHCHECK --start-period=2m CMD /usr/local/bin/docker-healthcheck.sh

ENTRYPOINT ["docker-entrypoint.sh"]

CMD ["unifi"]
Loading

0 comments on commit 83551f5

Please sign in to comment.