switch to multi-stage image
adapt docker-compose
...
master
lub 5 years ago
parent 1f50ac50d4
commit 82ac7e6188

@ -1,13 +1,13 @@
version: "3.2" v4ersion: "3.2"
services: services:
mongodb: mongodb:
image: mongo image: docker.io/mongo:4.0
volumes: volumes:
- /docker/unifi_mongodb/db:/data/db - /docker/unifi_mongodb/db:/data/db
controller: controller:
image: registry.lubiland.de/unifi-controller image: registry.lubiland.de/unifi-controller
volumes: volumes:
- /docker/unifi_controller/data:/opt/UniFi/data - /docker/unifi_controller/unifi/data:/unifi/data
ports: ports:
- target: 8080 - target: 8080
published: 8080 published: 8080

@ -1,17 +1,24 @@
FROM openjdk:8-jre-slim FROM docker.io/alpine AS downloader
WORKDIR /opt WORKDIR /unifi
ADD https://www.ubnt.com/downloads/unifi/5.10.26/UniFi.unix.zip Unifi.unix.zip ADD https://www.ubnt.com/downloads/unifi/5.10.26/UniFi.unix.zip Unifi.unix.zip
RUN unzip Unifi.unix.zip \ RUN apk add unzip \
&& unzip Unifi.unix.zip \
&& rm Unifi.unix.zip && rm Unifi.unix.zip
WORKDIR /opt/UniFi FROM openjdk:8-jre-slim
VOLUME /opt/UniFi/data WORKDIR /unifi
COPY --from=downloader /unifi/UniFi/ .
VOLUME /unifi/data
EXPOSE 8080
EXPOSE 8443 EXPOSE 8443
EXPOSE 3478/udp
CMD ["java", "-jar", "lib/ace.jar", "start"] CMD ["java", "-jar", "lib/ace.jar", "start"]