From e2936384150e764c99fa81ed985e0a4c33e8b263 Mon Sep 17 00:00:00 2001 From: Adrien le Maire Date: Fri, 28 Aug 2020 09:46:57 +0200 Subject: [PATCH] allow custom java_opts in unifi --- .gitlab-ci.yml | 20 ------------- pgadmin4/.version | 2 -- pgadmin4/Dockerfile | 72 --------------------------------------------- pgadmin4/Makefile | 15 ---------- unifi/Dockerfile | 5 +++- 5 files changed, 4 insertions(+), 110 deletions(-) delete mode 100644 pgadmin4/.version delete mode 100644 pgadmin4/Dockerfile delete mode 100644 pgadmin4/Makefile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c07112..273cd90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,26 +27,6 @@ unifi: variables: - $CI_COMMIT_REF_PROTECTED == "true" -dev-pgadmin4: - stage: build - tags: - - docker - script: - - make pgadmin4-nopush - only: - variables: - - $CI_COMMIT_REF_PROTECTED == "false" - -pgadmin4: - stage: build - tags: - - docker - script: - - make pgadmin4 - only: - variables: - - $CI_COMMIT_REF_PROTECTED == "true" - dev-mc: stage: build tags: diff --git a/pgadmin4/.version b/pgadmin4/.version deleted file mode 100644 index 76f401e..0000000 --- a/pgadmin4/.version +++ /dev/null @@ -1,2 +0,0 @@ -VERSION=4.24 -GUNICORN_VERSION=20.0.4 diff --git a/pgadmin4/Dockerfile b/pgadmin4/Dockerfile deleted file mode 100644 index 61f14ee..0000000 --- a/pgadmin4/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -FROM postgres:9.5 as pg95-builder -FROM postgres:9.6 as pg96-builder -FROM postgres:10 as pg10-builder -FROM postgres:11 as pg11-builder -FROM postgres:12 as pg12-builder - -FROM debian:stable-20200720-slim as tool-builder - -# Copy the PG binaries -COPY --from=pg95-builder /usr/lib/postgresql/9.5/bin/pg_dump /usr/local/pgsql/pgsql-9.5/ -COPY --from=pg95-builder /usr/lib/postgresql/9.5/bin/pg_dumpall /usr/local/pgsql/pgsql-9.5/ -COPY --from=pg95-builder /usr/lib/postgresql/9.5/bin/pg_restore /usr/local/pgsql/pgsql-9.5/ -COPY --from=pg95-builder /usr/lib/postgresql/9.5/bin/psql /usr/local/pgsql/pgsql-9.5/ - -COPY --from=pg96-builder /usr/lib/postgresql/9.6/bin/pg_dump /usr/local/pgsql/pgsql-9.6/ -COPY --from=pg96-builder /usr/lib/postgresql/9.6/bin/pg_dumpall /usr/local/pgsql/pgsql-9.6/ -COPY --from=pg96-builder /usr/lib/postgresql/9.6/bin/pg_restore /usr/local/pgsql/pgsql-9.6/ -COPY --from=pg96-builder /usr/lib/postgresql/9.6/bin/psql /usr/local/pgsql/pgsql-9.6/ - -COPY --from=pg10-builder /usr/lib/postgresql/10/bin/pg_dump /usr/local/pgsql/pgsql-10/ -COPY --from=pg10-builder /usr/lib/postgresql/10/bin/pg_dumpall /usr/local/pgsql/pgsql-10/ -COPY --from=pg10-builder /usr/lib/postgresql/10/bin/pg_restore /usr/local/pgsql/pgsql-10/ -COPY --from=pg10-builder /usr/lib/postgresql/10/bin/psql /usr/local/pgsql/pgsql-10/ - -COPY --from=pg11-builder /usr/lib/postgresql/11/bin/pg_dump /usr/local/pgsql/pgsql-11/ -COPY --from=pg11-builder /usr/lib/postgresql/11/bin/pg_dumpall /usr/local/pgsql/pgsql-11/ -COPY --from=pg11-builder /usr/lib/postgresql/11/bin/pg_restore /usr/local/pgsql/pgsql-11/ -COPY --from=pg11-builder /usr/lib/postgresql/11/bin/psql /usr/local/pgsql/pgsql-11/ - -COPY --from=pg12-builder /usr/lib/postgresql/12/bin/pg_dump /usr/local/pgsql/pgsql-12/ -COPY --from=pg12-builder /usr/lib/postgresql/12/bin/pg_dumpall /usr/local/pgsql/pgsql-12/ -COPY --from=pg12-builder /usr/lib/postgresql/12/bin/pg_restore /usr/local/pgsql/pgsql-12/ -COPY --from=pg12-builder /usr/lib/postgresql/12/bin/psql /usr/local/pgsql/pgsql-12/ - - -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 - -COPY --from=tool-builder /usr/local/pgsql /usr/local/ - -ARG TARGETARCH -ARG VERSION=4.24 - -RUN export GH_VERSION=$(echo ${VERSION} | tr '.' '_') && \ - apt update -qq && \ - 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 && \ - useradd -r -u 5050 -g pgadmin pgadmin && \ - mkdir -p /var/lib/pgadmin && \ - chown pgadmin:pgadmin /var/lib/pgadmin && \ - mkdir -p /var/log/pgadmin && \ - chown pgadmin:pgadmin /var/log/pgadmin && \ - touch /pgadmin4/config_distro.py && \ - chown pgadmin:pgadmin /pgadmin4/config_distro.py && \ - curl -o /pgadmin4/run_pgadmin.py https://raw.githubusercontent.com/postgres/pgadmin4/REL-${GH_VERSION}/pkg/docker/run_pgadmin.py && \ - curl -o /entrypoint.sh https://raw.githubusercontent.com/postgres/pgadmin4/REL-${GH_VERSION}/pkg/docker/entrypoint.sh && \ - 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 -ENTRYPOINT ["/entrypoint.sh"] diff --git a/pgadmin4/Makefile b/pgadmin4/Makefile deleted file mode 100644 index 53aee80..0000000 --- a/pgadmin4/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include pgadmin4/.version - -pgadmin4-nopush: - docker buildx build --platform linux/amd64 --load \ - --build-arg VERSION=$(VERSION) \ - --build-arg GUNICORN_VERSION=$(GUNICORN_VERSION) \ - --tag alemairebe/pgadmin4:$(VERSION) pgadmin4 - -pgadmin4: - docker buildx build --platform linux/amd64,linux/arm64,linux/arm --push \ - --build-arg VERSION=$(VERSION) \ - --build-arg GUNICORN_VERSION=$(GUNICORN_VERSION) \ - --cache-from=type=registry,ref=alemairebe/pgadmin4:buildx \ - --cache-to=type=registry,ref=alemairebe/pgadmin4:buildx \ - --tag alemairebe/pgadmin4:$(VERSION) pgadmin4 diff --git a/unifi/Dockerfile b/unifi/Dockerfile index 45165c7..afe57ec 100644 --- a/unifi/Dockerfile +++ b/unifi/Dockerfile @@ -20,6 +20,9 @@ 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 +ENV JAVA_OPTS -Xmx512M + +COPY entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] -ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/usr/bin/java", "-Xmx512M", "-jar", "/usr/lib/unifi/lib/ace.jar"] CMD ["start"]