-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
74 lines (64 loc) · 2.51 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM arm64v8/debian:11
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
curl \
wget \
mount \
psmisc \
dpkg \
apt \
lsb-release \
sudo \
gnupg \
apt-transport-https \
ca-certificates \
dirmngr \
mdadm \
iproute2 \
ethtool \
procps \
systemd-timesyncd \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get -y --no-install-recommends install systemd \
&& find /etc/systemd/system \
/lib/systemd/system \
-path '*.wants/*' \
-not -name '*journald*' \
-not -name '*systemd-tmpfiles*' \
-not -name '*systemd-user-sessions*' \
-exec rm \{} \; \
&& rm -rf /var/lib/apt/lists/*
STOPSIGNAL SIGKILL
RUN curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" > /etc/apt/sources.list.d/postgresql.list \
&& apt-get update \
&& apt-get -y --no-install-recommends install postgresql-14 postgresql-9.6 \
&& rm -rf /var/lib/apt/lists/*
COPY put-deb-files-here/*.deb /
COPY put-version-file-here/version /usr/lib/version
COPY files/lib /lib/
RUN apt-get -y --no-install-recommends install /ubnt-archive-keyring_*_arm64.deb \
&& echo 'deb https://apt.artifacts.ui.com bullseye main release beta' > /etc/apt/sources.list.d/ubiquiti.list \
&& chmod 666 /etc/apt/sources.list.d/ubiquiti.list \
&& apt-get update \
&& apt-get -y --no-install-recommends install /*.deb unifi-protect \
&& rm -f /*.deb \
&& rm -rf /var/lib/apt/lists/* \
&& echo "exit 0" > /usr/sbin/policy-rc.d \
&& sed -i 's/redirectHostname: unifi//' /usr/share/unifi-core/app/config/config.yaml \
&& mv /sbin/mdadm /sbin/mdadm.orig \
&& mv /usr/sbin/smartctl /usr/sbin/smartctl.orig \
&& systemctl enable storage_disk dbpermissions\
&& pg_dropcluster --stop 9.6 main \
&& sed -i 's/rm -f/rm -rf/' /sbin/pg-cluster-upgrade \
&& sed -i 's/OLD_DB_CONFDIR=.*/OLD_DB_CONFDIR=\/etc\/postgresql\/9.6\/main/' /sbin/pg-cluster-upgrade
COPY files/sbin /sbin/
COPY files/usr /usr/
COPY files/etc /etc/
VOLUME ["/srv", "/data", "/persistent"]
CMD ["/lib/systemd/systemd"]