-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
29 lines (23 loc) · 1.17 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
FROM busybox:1-uclibc AS downloader
ENV UNIFI_CONTROLLER_VERSION="9.0.108-u598f2io2a"
ENV MONGODB_VERSION="3.6.23"
RUN wget -O- https://dl.ui.com/unifi/${UNIFI_CONTROLLER_VERSION}/UniFi.unix.zip | unzip -qd /tmp -
RUN wget -O- https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB_VERSION}.tgz | tar -zx mongodb-linux-x86_64-${MONGODB_VERSION}/bin/mongod -C /tmp
RUN mv /tmp/mongodb-linux-x86_64-${MONGODB_VERSION}/bin/mongod /tmp/UniFi/bin/mongod
FROM gcr.io/distroless/java21-debian12@sha256:69c841c01c293c13e22ccd3deac56a3e24fbb3862517b74eed3e4e15c36bce64
LABEL org.opencontainers.image.source="https://github.com/trexx/docker-unifi-controller"
COPY --from=downloader --link /tmp/UniFi /app
WORKDIR /app
EXPOSE 8080/tcp 8443/tcp
CMD ["-Dfile.encoding=UTF-8", \
"--add-opens=java.base/java.lang=ALL-UNNAMED", \
"--add-opens=java.base/java.time=ALL-UNNAMED", \
"--add-opens=java.base/sun.security.util=ALL-UNNAMED", \
"--add-opens=java.base/java.io=ALL-UNNAMED", \
"--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED", \
"-XX:+UseParallelGC", \
"-XX:-UsePerfData", \
"-XX:+ExitOnOutOfMemoryError", \
"-jar", \
"/app/lib/ace.jar", \
"start"]