forked from mbentley/docker-omada-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.v3.2.x
45 lines (42 loc) · 2.35 KB
/
Dockerfile.v3.2.x
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
FROM ubuntu:18.04
HEALTHCHECK --start-period=5m CMD wget --quiet --tries=1 --no-check-certificate http://127.0.0.1:8088 || exit 1
MAINTAINER Matt Bentley <[email protected]>
# install omada controller (instructions taken from install.sh); then create a user & group and set the appropriate file system permissions
RUN \
echo "**** Install Dependencies ****" &&\
apt-get update &&\
DEBIAN_FRONTEND="noninteractive" apt-get install -y gosu net-tools tzdata wget &&\
rm -rf /var/lib/apt/lists/* &&\
echo "**** Download Omada Controller ****" &&\
cd /tmp &&\
wget -nv https://static.tp-link.com/2020/202001/20200116/Omada_Controller_v3.2.6_linux_x64.tar.gz &&\
echo "**** Extract and Install Omada Controller ****" &&\
tar zxvf Omada_Controller_v3.2.6_linux_x64.tar.gz &&\
rm Omada_Controller_v3.2.6_linux_x64.tar.gz &&\
cd Omada_Controller_* &&\
mkdir /opt/tplink/EAPController -vp &&\
cp bin /opt/tplink/EAPController -r &&\
cp data /opt/tplink/EAPController -r &&\
cp properties /opt/tplink/EAPController -r &&\
cp webapps /opt/tplink/EAPController -r &&\
cp keystore /opt/tplink/EAPController -r &&\
cp lib /opt/tplink/EAPController -r &&\
cp install.sh /opt/tplink/EAPController -r &&\
cp uninstall.sh /opt/tplink/EAPController -r &&\
cp jre /opt/tplink/EAPController/jre -r &&\
chmod 755 /opt/tplink/EAPController/bin/* &&\
chmod 755 /opt/tplink/EAPController/jre/bin/* &&\
echo "**** Cleanup ****" &&\
cd /tmp &&\
rm -rf /tmp/Omada_Controller* &&\
echo "**** Setup omada User Account ****" &&\
groupadd -g 508 omada &&\
useradd -u 508 -g 508 -d /opt/tplink/EAPController omada &&\
mkdir /opt/tplink/EAPController/logs /opt/tplink/EAPController/work &&\
chown -R omada:omada /opt/tplink/EAPController/data /opt/tplink/EAPController/logs /opt/tplink/EAPController/work
COPY entrypoint.sh /entrypoint.sh
WORKDIR /opt/tplink/EAPController
EXPOSE 8088 8043 27001/udp 27002 29810/udp 29811 29812 29813
VOLUME ["/opt/tplink/EAPController/data","/opt/tplink/EAPController/work","/opt/tplink/EAPController/logs"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/opt/tplink/EAPController/jre/bin/java","-server","-Xms128m","-Xmx1024m","-XX:MaxHeapFreeRatio=60","-XX:MinHeapFreeRatio=30","-XX:+HeapDumpOnOutOfMemoryError","-XX:-UsePerfData","-Deap.home=/opt/tplink/EAPController","-cp","/opt/tplink/EAPController/lib/*:","com.tp_link.eap.start.EapLinuxMain"]