Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@paulmurdoch19
Copy link

No description provided.

grugna and others added 28 commits August 26, 2025 10:39
Introduced a custom nginx.conf for improved logging and health check handling. Refactored the Dockerfile to install nginx, set up the gen3 user, configure Python and Poetry environments, and copy the nginx configuration into the image.
Changed the AZLINUX_BASE_VERSION argument to always use 'master' for the base image, ensuring consistency in local development environments.
Replaces hardcoded base image reference with the AZLINUX_BASE_VERSION build argument and renames the base stage to gen3base for clarity. Updates all references to the base stage accordingly.
Simplifies the Dockerfile by switching to quay.io/cdis/python-nginx-al as the base image, removing redundant build steps and user setup. Adds logic to ensure correct UID/GID for gen3 user and runtime directory ownership, and updates nginx capability handling for improved compatibility with OpenShift environments.
Replaces hardcoded base image references with the BASE_IMAGE build argument for improved flexibility and easier image source management.
Improves Dockerfile logic to robustly set gen3 user and group IDs to 1000970000 for OpenShift environments, using conditional checks and fallbacks. Consolidates ownership commands and ensures consistent permissions in both build and final stages.
Replaces the BASE_IMAGE ARG with a direct reference to quay.io/cdis/python-nginx-al using the AZLINUX_BASE_VERSION ARG. This change clarifies the image source and removes redundant ARG usage.
Removed duplicate 'FROM' keyword in the final stage image declaration to correct Dockerfile syntax.
Changed the Dockerfile to use the 'master' tag for the python-nginx-al base image instead of the AZLINUX_BASE_VERSION argument. This ensures consistent builds using the latest master image.
Switches base image from python-nginx-al to amazonlinux-base, adds explicit user and environment setup, installs dependencies and pipx, and streamlines nginx configuration and permissions. Simplifies user/group management and consolidates build and final stages for better maintainability and local development support.
Changed the Dockerfile base image stage name from 'base' to 'gen3base' for clarity and consistency across build stages.
Moved the builder stage definition after setting environment variables and working directory. This change improves Dockerfile organization and ensures environment setup precedes the builder stage.
Updated the Dockerfile to use the new python-nginx base image from ECR, simplifying the build process and removing custom nginx.conf. The nginx configuration is now expected to be provided by the base image, streamlining container setup.
Sync with CTDS created with pytohn script
if getuid() == 0:
user = "gen3"
group = "gen3"
else:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenShift wont run this container with uid and gid == gen3 or root so if were not running the container as the root user then we cannot switch to gen3 so use the uid and gid set by the container

fi

nginx
if [ "${OPENSHIFT}" = "true" ]; then
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if a Variable called OPENSHIFT is set to true, if so run the nginx execute that doesn't have the set cap added in the base image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants