{"id":24387181,"url":"https://github.com/andreasneuber/docker-based-e2e-tests","last_synced_at":"2026-05-13T16:31:59.111Z","repository":{"id":273129883,"uuid":"885871605","full_name":"andreasneuber/docker-based-e2e-tests","owner":"andreasneuber","description":"Example of a GitLab pipeline running end-to-end tests using DinD.","archived":false,"fork":false,"pushed_at":"2025-01-18T21:13:03.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T22:20:09.382Z","etag":null,"topics":["dind","docker","docker-registry","end-to-end-testing","gitlab-ci"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreasneuber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-09T16:03:42.000Z","updated_at":"2025-01-18T21:13:04.000Z","dependencies_parsed_at":"2025-01-18T22:30:17.144Z","dependency_job_id":null,"html_url":"https://github.com/andreasneuber/docker-based-e2e-tests","commit_stats":null,"previous_names":["andreasneuber/docker-based-e2e-tests"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasneuber%2Fdocker-based-e2e-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasneuber%2Fdocker-based-e2e-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasneuber%2Fdocker-based-e2e-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasneuber%2Fdocker-based-e2e-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreasneuber","download_url":"https://codeload.github.com/andreasneuber/docker-based-e2e-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243285602,"owners_count":20266846,"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","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":["dind","docker","docker-registry","end-to-end-testing","gitlab-ci"],"created_at":"2025-01-19T12:41:42.784Z","updated_at":"2025-12-27T20:59:53.201Z","avatar_url":"https://github.com/andreasneuber.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Based End-to-End Tests\n\n## Idea. What does this do?\nWe want to run end-to-end tests in a GitLab pipeline using Docker-in-Docker (DinD).\n- The \"application under test\" runs in a Docker container.  \n- The tests also run in a separate Docker container and are directed at the 'application under test' container.\n- The test report is copied from the test container into the build directory of the GitLab pipeline and saved as an artifact.\n\n## Steps\n- Create a docker container with your application under test (see Dockerfile in https://github.com/andreasneuber/automatic-test-sample-site)\n- Create a docker container with your tests (see Dockerfile in https://github.com/andreasneuber/playwright-cucumber-js-example)\n- Try out if the two containers work well together (see compose.yml in https://github.com/andreasneuber/playwright-cucumber-js-example)\n\n### If so...\n- Build and push the two containers into [GitLab container registry](https://docs.gitlab.com/ee/user/packages/container_registry/build_and_push_images.html)\n- Create two variables `$TEST_SITE_CONTAINER` and `$TEST` in GitLab settings, values are the containers listed in the [Container Registry](https://gitlab.com/andreasneuber/ruby-cucumber-selenium-framework/container_registry)\n- Run a pipeline using `.gitlab-ci.yml`\n\n### Creating/Refreshing Docker image of a GitLab repo via a pipeline\n```\nimage: docker:latest\n\nservices:\n  - docker:dind\n\nvariables:\n  DOCKER_DRIVER: overlay2\n  DOCKER_TLS_CERTDIR: \"\"\n\nstages:\n  - build\n\nbuild_image:\n  stage: build\n  script:\n    - docker build -t $CI_REGISTRY_IMAGE:latest .\n    - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY\n    - docker push $CI_REGISTRY_IMAGE:latest\n\n```\n\n## Links\n- [Docker Compose - How to execute multiple commands?](https://stackoverflow.com/questions/30063907/docker-compose-how-to-execute-multiple-commands)\n- [GitLab artifacts](https://docs.gitlab.com/ee/ci/jobs/job_artifacts.html)\n\n## FAQ\n\n### Why not install the application-under-test and the tests directly in the GitLab pipeline, instead of using Docker Containers?\n1) Imagine your application-under-test runs on PHP 8.1, but the tests require PHP 8.4.  \nUsing Docker Containers will keep the two versions apart.  \n\n2) Imagine your application under test is in a separate repository.  \nCloning it inside a pipeline is possible, but requires extra effort to ensure credentials are not exposed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasneuber%2Fdocker-based-e2e-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasneuber%2Fdocker-based-e2e-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasneuber%2Fdocker-based-e2e-tests/lists"}