{"id":16674252,"url":"https://github.com/waltertamboer/experiment-gitlab-ci-docker-image","last_synced_at":"2025-08-18T01:37:24.510Z","repository":{"id":146292862,"uuid":"126225977","full_name":"waltertamboer/experiment-gitlab-ci-docker-image","owner":"waltertamboer","description":"A test to see how Gitlab CI reacts to docker images with an entry point.","archived":false,"fork":false,"pushed_at":"2018-03-24T15:44:53.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T02:33:41.393Z","etag":null,"topics":["ci","docker","entrypoint","gitlab","gitlab-ci","image"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waltertamboer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-21T18:50:12.000Z","updated_at":"2018-03-24T15:44:53.000Z","dependencies_parsed_at":"2023-12-01T14:02:16.738Z","dependency_job_id":null,"html_url":"https://github.com/waltertamboer/experiment-gitlab-ci-docker-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/waltertamboer/experiment-gitlab-ci-docker-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-gitlab-ci-docker-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-gitlab-ci-docker-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-gitlab-ci-docker-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-gitlab-ci-docker-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waltertamboer","download_url":"https://codeload.github.com/waltertamboer/experiment-gitlab-ci-docker-image/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-gitlab-ci-docker-image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270932579,"owners_count":24670241,"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-08-17T02:00:09.016Z","response_time":129,"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":["ci","docker","entrypoint","gitlab","gitlab-ci","image"],"created_at":"2024-10-12T12:29:57.507Z","updated_at":"2025-08-18T01:37:24.487Z","avatar_url":"https://github.com/waltertamboer.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# experiment-gitlab-ci-docker-image\n\nA test to see how Gitlab CI reacts to docker images with an \nentry point.\n\n## Problem\n\nGitlab CI starts overrides the entry point of a Docker image with \nthe following script:\n\n```\nsh -c if [ -x /usr/local/bin/bash ]; then\n\texec /usr/local/bin/bash \nelif [ -x /usr/bin/bash ]; then\n\texec /usr/bin/bash \nelif [ -x /bin/bash ]; then\n\texec /bin/bash \nelif [ -x /usr/local/bin/sh ]; then\n\texec /usr/local/bin/sh \nelif [ -x /usr/bin/sh ]; then\n\texec /usr/bin/sh \nelif [ -x /bin/sh ]; then\n\texec /bin/sh \nelse\n\techo shell not found\n\texit 1\nfi\n```\n\nThis makes it impossible to run a container with a set entry \npoint such as `ENTRYPOINT [\"composer\"]`.\n\n## Solution\n\nThe solution I found is based on `https://github.com/composer/docker/blob/master/docker-entrypoint.sh`.\n\nThe trick is to detect the incoming command and based on that \ncommand differentiate the processing of it.\n\n## Bonus\n\nUse tini (https://github.com/krallin/tini) to initialize containers.\nTini spawns a single child and waits for it to exit all the while \nreaping zombies and performing signal forwarding.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaltertamboer%2Fexperiment-gitlab-ci-docker-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaltertamboer%2Fexperiment-gitlab-ci-docker-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaltertamboer%2Fexperiment-gitlab-ci-docker-image/lists"}