Commit Graph
88 Commits
Author SHA1 Message Date
Ashesh Vashi 1993109475 fix: pin Yarn version from packageManager field in remaining build scripts (#10175)
#10156 fixed CI build failures caused by Yarn 4.x fetching a newer patch
with different builtin compat hashes, breaking --immutable lockfile
validation, but only patched pkg/linux/build-functions.sh and the GHA
workflows. Make.bat, pkg/mac/build-functions.sh, pkg/pip/build.sh, and
Dockerfile still hardcoded 'yarn set version 4', which is what broke the
Windows Jenkins snapshot build (job 1669).
2026-07-23 13:06:29 +05:30
Ashesh Vashi 0d11dbc173 fix(docker): make CAP_NET_BIND_SERVICE optional for restricted runtimes (#9985)
The container previously applied CAP_NET_BIND_SERVICE to the python
interpreter so the non-root pgadmin user could bind to ports 80/443.
Some platforms refuse to honor file capabilities:

  - --cap-drop=ALL / OpenShift restricted-v2 SCC zero the bounding set,
    so the kernel returns EPERM on exec of any capability-tagged binary.
    This makes the image fail to start (issue #9657).
  - --security-opt=no-new-privileges / allowPrivilegeEscalation: false
    causes the kernel to silently strip file capabilities on exec, so
    the binary runs but a subsequent bind() to <1024 still fails.

Split the interpreter so neither default behavior nor restricted-runtime
support has to give up the other:

  - Dockerfile copies python3.X to /usr/local/bin/python3-cap and applies
    setcap to the copy. /usr/local/bin/python3.X stays un-capped, so
    /venv/bin/python3 (which symlinks to it) execs cleanly under
    restricted SCCs. A parallel /venv/bin/python3-cap symlink keeps the
    venv activation working when the capped interpreter is used.
  - entrypoint.sh reads /proc/self/status at startup. If NoNewPrivs is
    set, or CAP_NET_BIND_SERVICE is missing from the bounding set,
    gunicorn is invoked through the un-capped python and (when
    PGADMIN_LISTEN_PORT is unset) the default port falls back to 8080
    for plain HTTP or 8443 for TLS. A startup message records the
    choice.
  - Existing deployments with the default 80/443 mapping are unaffected:
    on every unrestricted runtime the bounding set still contains
    NET_BIND_SERVICE and gunicorn runs through the capped interpreter
    exactly as before.
  - PGADMIN_LISTEN_PORT, if set, is honored in both paths.

Docs gain a "Restricted Security Contexts" subsection covering the new
auto-detected fallback and the OpenShift / --cap-drop=ALL invocation.

Fixes #9657
2026-05-28 19:31:55 +05:30
Dave Page af888027a4 fix(docker): ship libpq-oauth-18.so and libcurl for PostgreSQL 18 OAuth (#9952)
libpq 18 dlopens libpq-oauth-18.so (the SASL OAUTHBEARER flow plugin)
when connecting to a server with an `oauth` pg_hba.conf rule. The
container previously copied only libpq.so.5.18 from postgres:18-alpine
and omitted both the plugin and its libcurl runtime dependency, so
OAuth connections failed with "no OAuth flows are available (try
installing the libpq-oauth package)" before any token exchange could
begin.

Add libpq-oauth-18.so to the existing pg18-builder COPY (it sits next
to libpq.so.5.18 in /usr/local/lib in postgres:18-alpine) and install
the libcurl apk package so the plugin can dlopen libcurl.so.4 at
runtime.

Closes #9951
2026-05-20 12:39:42 +05:30
Ashesh Vashi 4ddb16f47a fix: customize container user permissions using PUID and PGID. #9657 (#9833)
Add support for custom container user permissions via PUID and PGID
environment variables. When the container is started as root
(--user root), the pgadmin user is reassigned to the requested UID/GID
and all initialization runs under that user via su-exec, ensuring
files are created with correct ownership from the start.

Key changes:
- Dockerfile: add su-exec package, add chmod g=u for /run/pgadmin
  (fixes OpenShift random UID access)
- entrypoint.sh: add PUID/PGID validation and privilege dropping
  before initialization (not after), preserving OpenShift compatibility

Three modes supported:
- Default (USER 5050): unchanged behavior
- Custom UID (--user root -e PUID=N -e PGID=N): drops to target user
  before any init
- OpenShift (random UID, GID 0): passwd fixup + group permissions
2026-04-13 14:34:18 +05:30
Khushboo Vashi 5b231ddd3f Revert "Customize container user permissions using PUID and PGID. #9657"
This reverts commit 97c90f1e69.
2026-03-02 18:05:26 +05:30
kon-foo 97c90f1e69 Customize container user permissions using PUID and PGID. #9657 2026-02-24 16:49:43 +05:30
Akshay Joshi 52daa56a04 Copyright updated for 2026 2026-01-05 13:33:45 +05:30
Guiorgy c3da32f0f7 Correct erroneous comment in Dockerfile 2026-01-05 12:59:50 +05:30
Guiorgy 30f032b7d8 Optimisations in the Dockerfile
* mount .git from host instead of copying & removing
* use tmpfs for build cache in Dockerfile
* avoid rerunning apk when requirements.txt changes
2026-01-01 14:00:49 +05:30
Guiorgy 0132ce2001 fixed .git copy destination inside Dockerfile 2025-12-01 12:17:22 +05:30
Guiorgy c7909958da Optimised Dockerfile.
* Move the installation of dependencies to the top of the stage.
* Upgrade all system packages.
* Combine copy layers where possible.
2025-11-26 14:20:06 +05:30
Guiorgy d481507569 Removed the RUN rm -rf layer from the Dockerfile app-builder stage; exclusions are now handled by updating .dockerignore. 2025-11-24 11:37:49 +05:30
Guiorgy 4129d38410 Fix pkg_resources deprecation warning by migrating Docker base image to python:3-alpine from alpine:latest. #9155 2025-11-19 10:59:27 +05:30
Akshay Joshi 5c9acc1c3d 1) Added PG 18 in the github runner.
2) Added PG 18 in the docker container file.
2025-09-29 13:40:03 +05:30
Ethan Bayliss 454ba52c88 Update zstd library link to 1.5.7 in Dockerfile 2025-07-03 11:57:40 +05:30
Akshay Joshi cab1bc3cb4 Update yarn to version 4. 2025-06-06 19:08:32 +05:30
Akshay Joshi 12b263c20b Changed the version of libzstd.so from 1.5.6 to 1.5.7 for Docker builds. 2025-06-03 12:55:12 +05:30
Khushboo Vashi 58715daf10 Remove all references to the DEPENDENCIES file. 2025-05-29 16:01:56 +05:30
Koren Peretz 2cb69f09b9 Update the Dockerfile to use UID 5050 instead of the pgadmin user to prevent Kubernetes deployments from failing when securityContext.runAsNonRoot is set to true without specifying securityContext.runAsUser. 2025-05-09 15:24:42 +05:30
Akshay Joshi af6c1a24cf 1) Upgraded Gunicorn to version 23.0.0 to address a security vulnerability present in Gunicorn.
2) Resolved an issue where an empty PSQL panel would open if the psql utility was not found in the binary path.
2025-04-01 16:33:50 +05:30
Akshay Joshi a410b15e30 Fixed an issue where <br/> tag is visible in the error message when delete any database and it is in use. 2025-01-17 17:16:36 +05:30
Akshay Joshi 99e1f005fc Update Python version to 3.13 2025-01-15 13:44:34 +05:30
Akshay Joshi 964d211260 Copyright updated for 2025 2025-01-01 11:26:42 +05:30
Akshay Joshi ba58b140d4 Updated version of liblz4 in Docker file. 2024-12-16 14:58:47 +05:30
Akshay Joshi 17883fbd84 Use PG17 as the default in the container. #8022 2024-10-10 15:55:43 +05:30
Yogesh Mahajan 1fe840fcac Allow to pass PGADMIN_CONFIG_CONFIG_DATABASE_URI from docker secrets. #5869 2024-10-07 11:44:20 +05:30
Aditya Toshniwal e8f108154d Fix build failures. 2024-06-27 18:03:10 +05:30
Akshay Joshi dea5335ce5 Fixed the following SonarQube code smells:
1) Do not use the Array index in keys.
2) Import from the same module should be merged.
3) Mutable variables should not be exported.
4) Variables should not be initialized to undefined.
5) startswith or endswith method should be used.
6) Unwrap this unnecessarily grouped subpattern.

Additionally, addressed many other SonarQube rules.
2024-06-12 18:09:06 +05:30
Khushboo Vashi 6509e45b6f Fix the issue where docker with SSL v8.7 fails to start. #7520 2024-05-31 14:29:36 +05:30
Akshay Joshi 6179638fee Set CAP_NET_BIND_SERVICE to Python 3.12 in Dockerfile. 2024-05-24 12:22:32 +05:30
Akshay Joshi 2aa881d143 Fixed the Docker build by adding Corepack and changing the version of libzstd. 2024-05-23 18:19:08 +05:30
István Lantos 715839d295 Expose UNIX socket in entrypoint.sh for Docker implementation. #7221 2024-03-26 18:22:29 +05:30
Akshay Joshi 740ce15bd7 Update copyright notices for 2024 2024-01-01 14:13:48 +05:30
Harald Dumdey c84f38ac0f Update Dockerfile. Added tzdata 2023-11-29 11:30:52 +05:30
Aditya Toshniwal 5a7583654f Move yarn to berry first before moving to 3.x 2023-10-26 15:17:41 +05:30
Aditya Toshniwal 8997f616a2 Do not use minor version x when setting yarn version 2023-10-26 13:14:01 +05:30
Aditya Toshniwal f50f799b88 Use yarn version 3.x as berry is taking version 4.x now 2023-10-26 12:37:35 +05:30
Aditya Toshniwal 862f101772 Significant changes to use ReactJS extensively.
1. Replace the current layout library wcDocker with ReactJS based rc-dock. #6479
2. Have close buttons on individual panel tabs instead of common. #2821
3. Changes in the context menu on panel tabs - Add close, close all and close others menu items. #5394
4. Allow closing all the tabs, including SQL and Properties. #4733
5. Changes in docking behaviour of different tabs based on user requests and remove lock layout menu.
6. Fix an issue where the scroll position of panels was not remembered on Firefox. #2986
7. Reset layout now will not require page refresh and is done spontaneously.
8. Use the zustand store for storing preferences instead of plain JS objects. This will help reflecting preferences immediately.
9. The above fix incorrect format (no indent) of SQL stored functions/procedures. #6720
10. New version check is moved to an async request now instead of app start to improve startup performance.
11. Remove jQuery and Bootstrap completely.
12. Replace jasmine and karma test runner with jest. Migrate all the JS test cases to jest. This will save time in writing and debugging JS tests.
13. Other important code improvements and cleanup.
2023-10-23 17:43:17 +05:30
Akshay Joshi 4309aa3ba7 Ensure that the backup works properly for PG 16 on the latest docker image. #6790 2023-09-27 17:09:49 +05:30
Akshay Joshi 5736e173ea 1) Fixed an issue where PG 16 binaries not getting copied into the docker container.
2) Remove support for PostgreSQL 11.
2023-09-26 13:45:08 +05:30
Dave Page 5a26cad588 Use PG16 as the default in the container. 2023-09-21 15:35:44 +05:30
Yogesh Mahajan 76b0f80893 Pin correct gunicorn version to 20.1.0 as latest version gives error - Bad file descriptor. #3025 2023-07-19 12:55:28 +05:30
Yogesh Mahajan d17d291e07 Pin gunicorn version to 20.0.1 as latest version gives error - Bad file descriptor(Gunicorn Issue #3025). 2023-07-19 12:25:01 +05:30
Dave Page 6b232ba7e8 Remove unsupported PostgreSQL versions from the container.
Fixes #6532
2023-07-05 13:26:12 +01:00
Akshay Joshi 7e3a932890 Fixed SonarQube Bugs 2023-06-09 15:28:46 +05:30
Aditya Toshniwal c9920063dd Use python3.11 instead of python3 as setcap does not work on symlinks 2023-05-17 12:00:01 +05:30
Aditya Toshniwal 40b916dc2e Use python3 instead of python3.10 in Dockerfile to fix docker builds 2023-05-17 11:36:09 +05:30
Dave Page 034e96f713 Use Yarn 2 for Docker builds to avoid network timeout issues. 2023-03-27 10:58:18 +01:00
Dave Page cf948603cf Update copyright notices in Dockerfile and Makefile and ensure they don't get missed again. 2023-02-08 14:28:57 +00:00
Akshay Joshi 10c6a4f8dc 1) Unpin Sphinx version as the issue has been fixed in v 6.1.3
2) Update release note
2023-01-17 17:30:22 +05:30