Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tini as init process to all airflow images. (#176) #209

Closed
wants to merge 0 commits into from

Conversation

sudiptoghosh01
Copy link

Issue #, if available: #176

Description of changes:

  • Updated Dockerfile.base.j2 file to include necessary url components to download tini.
  • Updated Dockerfile.derivatives.j2, set the container entrypoint to use tini as init system and launches MWAA's Python entrypoint module.
  • Added tini installation and permissions setup in 001-init.sh script.
  • Made the above changes to all airflow images.

Description of testing:

  • Built and ran image locally with the run.sh script.
  • Checked if tini is running as PID#1 using /proc/1/status.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -31,6 +31,12 @@ ARG MARIADB_RPM_DEVEL_ARM_CHECKSUM=a49c1402378581ba2d63d97daa4a4c04
ARG MARIADB_RPM_SHARED_PREFIX=MariaDB-shared-11.4.3-1.fc38
ARG MARIADB_RPM_SHARED_X86_CHECKSUM=26a6c7fb021c09b85c21ec1878c1953f
ARG MARIADB_RPM_SHARED_ARM_CHECKSUM=fd2ce395bf7d2cb959495bbd02ffec2e
ARG TINI_DOWNLOAD_BASE_URL=https://github.com/krallin/tini/releases/download/v0.19.0/
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if ECS fargate provides a direct way to run init process. I see mention of initProcessEnabled in task definition parameters here.

Copy link
Author

Choose a reason for hiding this comment

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

initProcessEnabled is specific to ECS fargate. However, instances of these images can be deployed to any hosts. But looks like we can use init key in docker compose file that will automatically do the installation instead of doing that via shell. I will make the changes accordingly. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

In generally, I like the idea of using tini directly in the image so that customers can pull our image and not worry about init process, plus you get guaranteed parity with how it is running on MWAA.

However, my concern here is pulling from github during image build, at least for the MWAA use-case. I think we need a mechanism to be able to pull from some internal source / trusted vendor to avoid supply chain exposure.

Othewise, maybe we opt to use the built-in tini with docker

@vishalvijay18 vishalvijay18 requested a review from Kytha January 7, 2025 18:43
@@ -31,6 +31,12 @@ ARG MARIADB_RPM_DEVEL_ARM_CHECKSUM=a49c1402378581ba2d63d97daa4a4c04
ARG MARIADB_RPM_SHARED_PREFIX=MariaDB-shared-11.4.3-1.fc38
ARG MARIADB_RPM_SHARED_X86_CHECKSUM=26a6c7fb021c09b85c21ec1878c1953f
ARG MARIADB_RPM_SHARED_ARM_CHECKSUM=fd2ce395bf7d2cb959495bbd02ffec2e
ARG TINI_DOWNLOAD_BASE_URL=https://github.com/krallin/tini/releases/download/v0.19.0/
Copy link
Contributor

Choose a reason for hiding this comment

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

In generally, I like the idea of using tini directly in the image so that customers can pull our image and not worry about init process, plus you get guaranteed parity with how it is running on MWAA.

However, my concern here is pulling from github during image build, at least for the MWAA use-case. I think we need a mechanism to be able to pull from some internal source / trusted vendor to avoid supply chain exposure.

Othewise, maybe we opt to use the built-in tini with docker

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.

3 participants