Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from deb to zip package #67

Merged
merged 4 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="thespad"

# environment settings
ARG UNIFI_BRANCH="stable"
ARG DEBIAN_FRONTEND="noninteractive"
ARG UNIFI_BRANCH="stable" \
DEBIAN_FRONTEND="noninteractive"

RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
binutils \
apt-get install --no-install-recommends -y \
jsvc \
libcap2 \
logrotate \
openjdk-17-jre-headless && \
openjdk-17-jre-headless \
unzip && \
echo "**** install unifi ****" && \
if [ -z ${UNIFI_VERSION+x} ]; then \
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
Expand All @@ -31,9 +30,10 @@ RUN \
fi && \
mkdir -p /app && \
curl -o \
/tmp/unifi.deb -L \
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
/tmp/unifi.zip -L \
"https://dl.ui.com/unifi/${UNIFI_VERSION}/UniFi.unix.zip" && \
unzip /tmp/unifi.zip -d /usr/lib && \
mv /usr/lib/UniFi /usr/lib/unifi && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="thespad"

# environment settings
ARG UNIFI_BRANCH="stable"
ARG DEBIAN_FRONTEND="noninteractive"
ARG UNIFI_BRANCH="stable" \
DEBIAN_FRONTEND="noninteractive"

RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
binutils \
apt-get install --no-install-recommends -y \
jsvc \
libcap2 \
logrotate \
openjdk-17-jre-headless && \
openjdk-17-jre-headless \
unzip && \
echo "**** install unifi ****" && \
if [ -z ${UNIFI_VERSION+x} ]; then \
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
Expand All @@ -31,9 +30,10 @@ RUN \
fi && \
mkdir -p /app && \
curl -o \
/tmp/unifi.deb -L \
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
/tmp/unifi.zip -L \
"https://dl.ui.com/unifi/${UNIFI_VERSION}/UniFi.unix.zip" && \
unzip /tmp/unifi.zip -d /usr/lib && \
mv /usr/lib/UniFi /usr/lib/unifi && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,6 @@ app_setup_block: |

# changelog
changelogs:
- { date: "04.03.24:", desc: "Install from zip package instead of deb." }
- { date: "17.10.23:", desc: "Add environment variables for TLS and authSource to support Atlas and new MongoDB versions." }
- { date: "05.09.23:", desc: "Initial release." }
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# create our folders
mkdir -p \
/run/unifi/work/ROOT \
/config/{data,logs}

# create symlinks for config
Expand All @@ -19,6 +20,13 @@ for i in "${symlinks[@]}"; do
fi
done

if [[ -L "/usr/lib/unifi/run" && ! "/usr/lib/unifi/run" -ef "/run/unifi" ]]; then
unlink "/usr/lib/unifi/run"
fi
if [[ ! -L "/usr/lib/unifi/run" ]]; then
ln -s "/run/unifi" "/usr/lib/unifi/run"
fi

if [[ ! -e /config/data/system.properties ]]; then
if [[ -z "${MONGO_HOST}" ]]; then
echo "*** No MONGO_HOST set, cannot configure database settings. ***"
Expand Down