docker-unifi-network-applic.../Dockerfile.aarch64

45 lines
1.1 KiB
Docker
Raw Normal View History

2023-09-05 09:07:14 -07:00
# syntax=docker/dockerfile:1
2023-11-16 01:08:59 -08:00
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.18
2023-09-05 09:07:14 -07:00
# set version label
ARG BUILD_DATE
ARG VERSION
ARG UNIFI_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad"
# environment settings
ARG UNIFI_BRANCH="stable"
RUN \
echo "**** install packages ****" && \
2023-11-16 01:08:59 -08:00
apk add --no-cache \
2023-09-05 09:07:14 -07:00
jsvc \
logrotate \
2023-11-16 01:08:59 -08:00
openjdk17-jre-headless && \
2023-09-05 09:07:14 -07:00
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 \
|grep -A 7 -m 1 'Package: unifi' \
| awk -F ': ' '/Version/{print $2;exit}' \
| awk -F '-' '{print $1}'); \
fi && \
mkdir -p /app && \
curl -o \
2023-11-16 01:08:59 -08:00
/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 && \
2023-09-05 09:07:14 -07:00
echo "**** cleanup ****" && \
rm -rf \
2023-11-16 01:08:59 -08:00
/tmp/*
2023-09-05 09:07:14 -07:00
# add local files
COPY root/ /
# Volumes and Ports
WORKDIR /usr/lib/unifi
VOLUME /config
EXPOSE 8080 8443 8843 8880