{"id":28420690,"url":"https://github.com/redhat-developer/podman-desktop-image-checker-openshift-ext","last_synced_at":"2025-07-30T16:36:17.197Z","repository":{"id":82170434,"uuid":"567236164","full_name":"redhat-developer/podman-desktop-image-checker-openshift-ext","owner":"redhat-developer","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-15T15:43:46.000Z","size":3579,"stargazers_count":4,"open_issues_count":12,"forks_count":5,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-07-15T20:59:39.261Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-11-17T11:13:01.000Z","updated_at":"2025-07-15T15:43:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"6172a61c-11d9-43a6-9126-f978694b1716","html_url":"https://github.com/redhat-developer/podman-desktop-image-checker-openshift-ext","commit_stats":null,"previous_names":["redhat-developer/podman-desktop-image-checker-openshift-ext"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/redhat-developer/podman-desktop-image-checker-openshift-ext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fpodman-desktop-image-checker-openshift-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fpodman-desktop-image-checker-openshift-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fpodman-desktop-image-checker-openshift-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fpodman-desktop-image-checker-openshift-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-developer","download_url":"https://codeload.github.com/redhat-developer/podman-desktop-image-checker-openshift-ext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fpodman-desktop-image-checker-openshift-ext/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267899771,"owners_count":24163001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-05T03:49:14.947Z","updated_at":"2025-07-30T16:36:17.175Z","avatar_url":"https://github.com/redhat-developer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenShift Checker\n\nThe OpenShift checker is a tool whose goal is to analyze a Containerfile and highlight the directives and commands which could cause an unexpected behavior when running on an OpenShift cluster.\n\nIn many cases a Containerfile could work fine on a Kubernetes cluster and fail on OpenShift because of its security restrictions. This tool should help finding what is wrong and driving users to update their Containerfiles to make them OpenShift compliant.\n\nThe Containerfile's directives and commands currently supported are listed below.\n\n### User directive\n\nIn OpenShift, a container is run using an arbitrarily assigned user ID. For this reason setting the runtime user to `root` would not have any effect and it could lead to unexpected results.\n\nAn example of a wrong instruction that the tool would detect is\n```\nUSER root\n```\n\nwith this printed message \n```\nUSER directive set to root at line 28 could cause an unexpected behavior.\nIn OpenShift, containers are run using arbitrarily assigned user ID\n```\n\n### Run Directive\n\nThe RUN instruction executes any commands in a new layer on top of the current image and commit the results. Because of the unlimited number of different commands that can be executed, this tool only focuses on those related to permissions settings.\n\n#### chmod\n\nIn Openshift, directories and files need to be read/writable by the root group and files that must be executed should have group execute permissions.\nAnything that does not give the right group permissions could lead to unexpected results.\n\nAn example of a wrong instruction that the tool would detect is\n```\nRUN chmod 700 /app\n```\n\nwith this printed message \n```\npermission set on chmod 700 /app at line 10-18 could cause an unexpected\nbehavior. Is it an executable file? Try updating permissions to 770 otherwise\nset it to 760\nExplanation - in Openshift, directories and files need to be read/writable\nby the root group and files that must be executed should have group execute\npermissions\n```\n\n#### chown\n\nAlthough OpenShift runs containers using an arbitrarily assigned user ID, the group ID must always be set to the root group (0). Therefore, the directories and files that the processes running in the image need to access should have their group ownership set to the root group. \n\nAn example of a wrong instruction that the tool would detect is\n```\nRUN chown -R node:node /app\n```\n\nwith this printed message \n```\nowner set on  chown -R node:node /app at line 10-18 could cause an unexpected\nbehavior. In OpenShift the group ID must always be set to the root group (0)\n```\n\n#### sudo/su\n\nIf you use `sudo` or `su` as the prefix for any Linux command, this will be executed with elevated privileges. However in OpenShift a container is run using an arbitrarily assigned user ID and therefore the command outcome could be not the one expected.\n\nAn example of a wrong instruction that the tool would detect is\n```\nRUN sudo node -v\n```\n\nwith this printed message \n```\nsudo/su command used in 'sudo node -v' at line 26 could cause an unexpected\nbehavior. In OpenShift, containers are run using arbitrarily assigned user ID\nand elevating privileges could lead to an unexpected behavior\n```\n\n### Expose directive\n\nBy default ports 1-1023 are privileged ports that only the root user can bind. When running a container on OpenShift, it is then needed to use ports greater than 1023.\n\nAn example of a wrong instruction that the tool would detect is\n```\nEXPOSE 80\n```\n\nwith this printed message \n```\nport 80 exposed at line 28 could be wrong. TCP/IP port numbers below 1024 are\nprivileged port numbers\n```\n\nCli\n===\n\nTo build and use the cli, execute\n\n```\ngo build -o doa[.exe]\ndoa[.exe] analyze -f /your/local/project/path[/Containerfile_name]\n```\n\nPodman Desktop Extension\n========================\n\nTo install the extension on Podman Desktop, you can click on the \"Extensions\" icon in the left sidebar and search for \"Checker\".\n\nContributing\n============\nThis is an open source project open to anyone. This project welcomes contributions and suggestions!\n\nFor information on getting started, refer to the [CONTRIBUTING instructions](https://github.com/redhat-developer/podman-desktop-image-checker-openshift-ext/blob/main/CONTRIBUTING.md).\n\n\nFeedback \u0026 Questions\n====================\nIf you discover an issue please file a bug and we will fix it as soon as possible.\n* File a bug in [GitHub Issues](https://github.com/redhat-developer/podman-desktop-image-checker-openshift-ext/issues).\n\nLicense\n=======\nApache 2.0, See [LICENSE](https://github.com/redhat-developer/podman-desktop-image-checker-openshift-ext/blob/main/LICENSE) for more information.\n\nAcknowledgments\n===============\n\nThis tool was born thanks to the awesome article written by Michael Greenberg \"Adapting Docker and Kubernetes containers to run on Red Hat OpenShift Container Platform\" [link](https://developers.redhat.com/blog/2020/10/26/adapting-docker-and-kubernetes-containers-to-run-on-red-hat-openshift-container-platform).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer%2Fpodman-desktop-image-checker-openshift-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-developer%2Fpodman-desktop-image-checker-openshift-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer%2Fpodman-desktop-image-checker-openshift-ext/lists"}