mirror of
https://github.com/linuxserver/docker-unifi-network-application.git
synced 2024-11-09 23:24:08 -08:00
Merge pull request #67 from linuxserver/zip
Switch from deb to zip package
This commit is contained in:
commit
415a778d41
18
Dockerfile
18
Dockerfile
|
@ -10,18 +10,17 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
|
||||||
LABEL maintainer="thespad"
|
LABEL maintainer="thespad"
|
||||||
|
|
||||||
# environment settings
|
# environment settings
|
||||||
ARG UNIFI_BRANCH="stable"
|
ARG UNIFI_BRANCH="stable" \
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install --no-install-recommends -y \
|
||||||
binutils \
|
|
||||||
jsvc \
|
jsvc \
|
||||||
libcap2 \
|
|
||||||
logrotate \
|
logrotate \
|
||||||
openjdk-17-jre-headless && \
|
openjdk-17-jre-headless \
|
||||||
|
unzip && \
|
||||||
echo "**** install unifi ****" && \
|
echo "**** install unifi ****" && \
|
||||||
if [ -z ${UNIFI_VERSION+x} ]; then \
|
if [ -z ${UNIFI_VERSION+x} ]; then \
|
||||||
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
|
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
|
||||||
|
@ -31,9 +30,10 @@ RUN \
|
||||||
fi && \
|
fi && \
|
||||||
mkdir -p /app && \
|
mkdir -p /app && \
|
||||||
curl -o \
|
curl -o \
|
||||||
/tmp/unifi.deb -L \
|
/tmp/unifi.zip -L \
|
||||||
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
|
"https://dl.ui.com/unifi/${UNIFI_VERSION}/UniFi.unix.zip" && \
|
||||||
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
|
unzip /tmp/unifi.zip -d /usr/lib && \
|
||||||
|
mv /usr/lib/UniFi /usr/lib/unifi && \
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
|
|
@ -10,18 +10,17 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
|
||||||
LABEL maintainer="thespad"
|
LABEL maintainer="thespad"
|
||||||
|
|
||||||
# environment settings
|
# environment settings
|
||||||
ARG UNIFI_BRANCH="stable"
|
ARG UNIFI_BRANCH="stable" \
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install --no-install-recommends -y \
|
||||||
binutils \
|
|
||||||
jsvc \
|
jsvc \
|
||||||
libcap2 \
|
|
||||||
logrotate \
|
logrotate \
|
||||||
openjdk-17-jre-headless && \
|
openjdk-17-jre-headless \
|
||||||
|
unzip && \
|
||||||
echo "**** install unifi ****" && \
|
echo "**** install unifi ****" && \
|
||||||
if [ -z ${UNIFI_VERSION+x} ]; then \
|
if [ -z ${UNIFI_VERSION+x} ]; then \
|
||||||
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
|
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
|
||||||
|
@ -31,9 +30,10 @@ RUN \
|
||||||
fi && \
|
fi && \
|
||||||
mkdir -p /app && \
|
mkdir -p /app && \
|
||||||
curl -o \
|
curl -o \
|
||||||
/tmp/unifi.deb -L \
|
/tmp/unifi.zip -L \
|
||||||
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
|
"https://dl.ui.com/unifi/${UNIFI_VERSION}/UniFi.unix.zip" && \
|
||||||
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
|
unzip /tmp/unifi.zip -d /usr/lib && \
|
||||||
|
mv /usr/lib/UniFi /usr/lib/unifi && \
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
|
|
@ -123,5 +123,6 @@ app_setup_block: |
|
||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
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: "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." }
|
- { date: "05.09.23:", desc: "Initial release." }
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
# create our folders
|
# create our folders
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
|
/run/unifi/work/ROOT \
|
||||||
/config/{data,logs}
|
/config/{data,logs}
|
||||||
|
|
||||||
# create symlinks for config
|
# create symlinks for config
|
||||||
|
@ -19,6 +20,13 @@ for i in "${symlinks[@]}"; do
|
||||||
fi
|
fi
|
||||||
done
|
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 [[ ! -e /config/data/system.properties ]]; then
|
||||||
if [[ -z "${MONGO_HOST}" ]]; then
|
if [[ -z "${MONGO_HOST}" ]]; then
|
||||||
echo "*** No MONGO_HOST set, cannot configure database settings. ***"
|
echo "*** No MONGO_HOST set, cannot configure database settings. ***"
|
||||||
|
|
Loading…
Reference in a new issue