From 3d8bd2114223557ba7fb737857e490621f939572 Mon Sep 17 00:00:00 2001 From: Adrien le Maire Date: Thu, 20 Aug 2020 10:47:08 +0200 Subject: [PATCH] add unifi --- pgadmin4/Dockerfile | 11 +++++++---- unifi/.version | 2 ++ unifi/Dockerfile | 25 +++++++++++++++++++++++++ unifi/Makefile | 15 +++++++++++++++ 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 unifi/.version create mode 100644 unifi/Dockerfile create mode 100644 unifi/Makefile diff --git a/pgadmin4/Dockerfile b/pgadmin4/Dockerfile index e6dc115..61f14ee 100644 --- a/pgadmin4/Dockerfile +++ b/pgadmin4/Dockerfile @@ -33,7 +33,7 @@ COPY --from=pg12-builder /usr/lib/postgresql/12/bin/pg_restore /usr/local/pgsql/ COPY --from=pg12-builder /usr/lib/postgresql/12/bin/psql /usr/local/pgsql/pgsql-12/ -FROM debian:stable-20200720-slim +FROM debian:bullseye-20200720-slim ARG DEBIAN_FRONTEND=noninteractive ADD https://curl.haxx.se/ca/cacert.pem /etc/ssl/certs/cacert.pem ENV CURL_CA_BUNDLE=/etc/ssl/certs/cacert.pem @@ -42,12 +42,14 @@ COPY --from=tool-builder /usr/local/pgsql /usr/local/ ARG TARGETARCH ARG VERSION=4.24 -ARG GUNICORN_VERSION=20.0.4 RUN export GH_VERSION=$(echo ${VERSION} | tr '.' '_') && \ apt update -qq && \ - apt install -qqy --no-install-recommends curl python3-pip python3-nacl python3-openssl python3-bcrypt python3-cffi python3-psycopg2 python3-psutil python3-sshtunnel python3-dev python3-setuptools libpq-dev build-essential libffi-dev && \ - pip3 install --no-cache-dir pgadmin4==${VERSION} gunicorn==${GUNICORN_VERSION} && \ + apt install -qqy --no-install-recommends curl python3-pip gunicorn build-essential python3-dev && \ + apt install -qqy --no-install-recommends python3-flask-mail python3-flask-principal python3-flask-compress && \ + apt install -qqy --no-install-recommends python3-blinker python3-werkzeug python3-passlib python3-six && \ + apt install -qqy --no-install-recommends python3-speaklater python3-wtforms python3-sqlalchemy python3-sshtunnel python3-ldap3 && \ + pip3 install --no-cache-dir pgadmin4==${VERSION} && \ ln -s /usr/local/lib/python3.7/dist-packages/pgadmin4 /pgadmin4 && \ ln -s /usr/bin/python3 /usr/bin/python && \ groupadd -g 5050 pgadmin && \ @@ -63,6 +65,7 @@ RUN export GH_VERSION=$(echo ${VERSION} | tr '.' '_') && \ chmod +x /entrypoint.sh && \ apt remove -qqy python3-dev python3-pip libpq-dev build-essential libffi-dev curl && \ apt autoremove -qqy && rm -rf /var/lib/apt/lists/* + WORKDIR /pgadmin4 USER 5050 VOLUME /var/lib/pgadmin diff --git a/unifi/.version b/unifi/.version new file mode 100644 index 0000000..f6be62d --- /dev/null +++ b/unifi/.version @@ -0,0 +1,2 @@ +VERSION=6.0.13 +UNIFI_VERSION=6.0.13-49f6654778 diff --git a/unifi/Dockerfile b/unifi/Dockerfile new file mode 100644 index 0000000..45165c7 --- /dev/null +++ b/unifi/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:focal-20200729 + +ARG DEBIAN_FRONTEND=noninteractive + +ARG TARGETARCH +ENV UNIFI_VERSION 6.0.13-49f6654778 +ENV VERSION 6.0.13 +WORKDIR /tmp +RUN mkdir -p /usr/share/man/man1 && \ + apt update -qq && \ + apt install -qqy --no-install-recommends wget ca-certificates && \ + wget -q https://www.ubnt.com/downloads/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb && \ + apt install -qqy --no-install-recommends /tmp/unifi_sysvinit_all.deb procps tini openjdk-8-jre-headless && \ + apt remove -qqy wget && \ + rm -rf /var/lib/apt/lists/* && \ + rm /tmp/unifi_sysvinit_all.deb + + +RUN ln -s /var/lib/unifi /usr/lib/unifi/data +EXPOSE 8080/tcp 8443/tcp 8843/tcp 8880/tcp 3478/udp + +WORKDIR /var/lib/unifi + +ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/usr/bin/java", "-Xmx512M", "-jar", "/usr/lib/unifi/lib/ace.jar"] +CMD ["start"] diff --git a/unifi/Makefile b/unifi/Makefile new file mode 100644 index 0000000..62c4fff --- /dev/null +++ b/unifi/Makefile @@ -0,0 +1,15 @@ +include unifi/.version + +unifi-nopush: + docker buildx build --platform linux/amd64 --load \ + --build-arg VERSION=$(VERSION) \ + --build-arg UNIFI_VERSION=$(UNIFI_VERSION) \ + --tag alemairebe/unifi:$(VERSION) unifi + +unifi: + docker buildx build --platform linux/amd64,linux/arm64 --push \ + --build-arg VERSION=$(VERSION) \ + --build-arg UNIFI_VERSION=$(UNIFI_VERSION) \ + --cache-from=type=registry,ref=alemairebe/unifi:buildx \ + --cache-to=type=registry,ref=alemairebe/unifi:buildx \ + --tag alemairebe/unifi:$(VERSION) unifi