docker-unifi-network-applic.../Dockerfile
2023-11-16 09:08:59 +00:00

45 lines
1.1 KiB
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:3.18
# 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 ****" && \
apk add --no-cache \
jsvc \
logrotate \
openjdk17-jre-headless && \
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 \
/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 ****" && \
rm -rf \
/tmp/*
# add local files
COPY root/ /
# Volumes and Ports
WORKDIR /usr/lib/unifi
VOLUME /config
EXPOSE 8080 8443 8843 8880