-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·40 lines (30 loc) · 917 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM ubuntu:20.04
LABEL version="8.0.26"
LABEL Description="UniFi controller with autostart and haveged installed"
ARG DEBIAN_FRONTEND=noninteractive
# Pulled from https://ui.com/download/releases/network-server
ARG PKG_URL=https://dl.ui.com/unifi/8.0.28/unifi_sysvinit_all.deb
ENV BASEDIR=/usr/lib/unifi \
DATADIR=/unifi/data \
LOGDIR=/unifi/logs \
CERTDIR=/unifi/cert \
RUNDIR=/unifi/run \
ORUNDIR=/var/run/unifi \
ODATADIR=/var/lib/unifi \
OLOGDIR=/var/log/unifi \
CERTNAME=cert.pem \
CERT_PRIVATE_NAME=privkey.pem \
CERT_IS_CHAIN=false \
BIND_PRIV=false \
RUNAS_UID0=false \
UNIFI_GID=1000 \
UNIFI_UID=1000 \
TIMEZONE=Etc/UTC
COPY docker-build.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-build.sh
RUN set -ex \
&& /usr/local/bin/docker-build.sh "${PKG_URL}"
COPY docker-entry.sh /usr/local/bin/
WORKDIR "${BASEDIR}"
ENTRYPOINT ["/usr/local/bin/docker-entry.sh"]
CMD ["unifi"]