You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/04/02 19:29:08 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #15162: Fail in case wrong UID or GID is used for prod image

potiuk commented on a change in pull request #15162:
URL: https://github.com/apache/airflow/pull/15162#discussion_r606385727



##########
File path: scripts/in_container/prod/entrypoint_prod.sh
##########
@@ -244,6 +243,30 @@ function exec_to_bash_or_python_command_if_specified() {
     fi
 }
 
+function check_uid_gid() {
+    if [[ $(id -u) == "50000" ]]; then
+        return
+    fi
+    if [[ $(id -g) == "0" ]]; then
+        return
+    fi
+    >&2 echo
+    >&2 echo "ERROR! you should run the image with UID=50000 or GID=0"
+    >&2 echo
+    >&2 echo "The image can be run in two ways when it comes to UID:"
+    >&2 echo "  * with 'airflow' user (UID=50000) and any GID"
+    >&2 echo "  * with any user and GID=0 (root)"
+    >&2 echo
+    >&2 echo " You start the image with UID=$(id -u) and GID=$(id -g)"
+    >&2 echo
+    >&2 echo " This is to learn from the guidelines of OpenShift and make the image OpenShift compatible"
+    >&2 echo " See more about it in the docker image documentation on http://airflow.apache.org/docs/"
+    >&2 echo " or https://docs.openshift.com/container-platform/4.7/openshift_images/create-images.html#images-create-guide-openshift_create-images"

Review comment:
       Agree. We are going to have a new "docker" area in teh 2.0.2 image. I am going to point to that - in the updated documentation, I already explained it in more detailed and linked to openshift guidelines.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org