{"id":19942084,"url":"https://github.com/day8/dockerfiles-for-ci-images","last_synced_at":"2025-07-03T18:33:56.195Z","repository":{"id":61962266,"uuid":"288045861","full_name":"day8/dockerfiles-for-ci-images","owner":"day8","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-20T03:10:25.000Z","size":279,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-08T09:03:52.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/day8.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license.txt","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,"zenodo":null}},"created_at":"2020-08-17T00:08:13.000Z","updated_at":"2025-02-20T03:10:28.000Z","dependencies_parsed_at":"2025-02-18T22:22:08.330Z","dependency_job_id":"4002dfa2-98b8-4fd0-a468-595f482c345c","html_url":"https://github.com/day8/dockerfiles-for-ci-images","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/day8/dockerfiles-for-ci-images","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Fdockerfiles-for-ci-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Fdockerfiles-for-ci-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Fdockerfiles-for-ci-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Fdockerfiles-for-ci-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/day8","download_url":"https://codeload.github.com/day8/dockerfiles-for-ci-images/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Fdockerfiles-for-ci-images/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263379589,"owners_count":23457875,"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":[],"created_at":"2024-11-13T00:11:38.195Z","updated_at":"2025-07-03T18:33:56.162Z","avatar_url":"https://github.com/day8.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockerfiles for `day8/core` and Derivative Images\n\nThe [`ghcr.io/day8/core`][1] and derivative Docker images are the \nreference testing environment used throughout [Day8's](https://www.day8.com.au/) \ncontinuous integration pipeline.\n\nOn pushing code to GitHub, this Docker image is the environment used to execute tests and build \nreleases for deployment with GitHub Actions.\n \nThis repository contains the [`Dockerfile`s][3] to build the [`ghcr.io/day8/core`][1] \nDocker image. It also contains the [GitHub Actions][4] that test and deploy the Docker image.\n\n[Ubuntu 20.04 LTS][5] was chosen as the base image as it is a long term stable release of a widely \nunderstood and supported distribution.\n\n[1]: https://github.com/orgs/day8/packages?repo_name=dockerfiles-for-dev-ci-images\n[2]: https://www.day8.com.au/\n[3]: https://github.com/day8/dockerfiles-for-dev-ci-images/blob/master/Dockerfile\n[4]: https://github.com/day8/dockerfiles-for-dev-ci-images/actions\n[5]: https://hub.docker.com/_/ubuntu\n\n## Quick Start\n\nTo run an interactive terminal:\n```\n$ docker login ghcr.io\n$ docker run -it --rm ghcr.io/day8/core:5.0.0\n```\n\n## Build Requirements\n\nOn image startup the exact versions of important software are printed to the\nconsole.\n\n| Name                                                | Version               | Description | Origin | \n| --------------------------------------------------- |-----------------------| ----------- | ------ |\n| Leiningen                                           | `2.9.x`               | Clojure(Script) build tool. Day8's main build tool. | [GitHub Releases Assets](https://github.com/technomancy/leiningen/releases) |\n| Clojure                                             | `1.11.x`              | 'Official' Clojure CLI tools. | [Clojure Website](https://clojure.org/guides/getting_started) |\n| OpenJDK                                             | `11.x` (LTS)          | Java runtime. Dependency of Leiningen, `clojure` CLI etc. | [Ubuntu Package: `openjdk-11-headless`](https://packages.ubuntu.com/focal-updates/openjdk-11-jdk-headless) |\n| Node.js                                             | `18.12.x` (LTS)       | JavaScript runtime. Dependency of `shadow-cljs`. | [NodeSource Package Repository](https://github.com/nodesource/distributions) |\n| NPM                                                 | `9.1.x` (LTS)         | JavaScript package manager. Dependency of `shadow-cljs`. | Bundled with Node.js |\n| Python 2                                            | `2.7.x`               | Python 2 runtime. | [Ubuntu Package: `python2`](https://packages.ubuntu.com/focal/python2) |\n| Python 3                                            | `3.8.x`               | Python 3 runtime. | [Ubuntu Package: `python3`](https://packages.ubuntu.com/focal/python3) |\n| `pip`                                               | Latest at build time. | Python package manager. | [Ubuntu Package: `python3-pip`](https://packages.ubuntu.com/focal/python3-pip) |\n| `pipenv`                                            | Latest at build time. | Python package manager. | [Python Package: `pipenv`](https://pypi.org/project/pipenv/) |\n| `pytest`                                            | Latest at build time. | Python test runner. | [Python Package: `pytest`](https://pypi.org/project/pytest/) |\n| Git                                                 | Latest at build time. | Dependency of [`actions/checkout`](https://github.com/actions/checkout) and [`day8/lein-git-inject`](https://github.com/day8/lein-git-inject) | ['Git stable releases' Ubuntu PPA](https://launchpad.net/~git-core/+archive/ubuntu/ppa) |\n| [`aws`](https://docs.aws.amazon.com/cli/index.html) | Latest at build time. | Interface to Amazon Web Services. Dependency of S3 deployments. | [Official AWS Package: `awscli-exe-linux-x86_64.zip`](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html) |\n| [`sam`](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) |                       | Creates and manages AWS serverless applications. | [Official AWS Package: `aws-sam-cli-linux-x86_64.zip`](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-linux.html) |\n| GNU Compiler Collection                             | `9.3.x`               | C (`gcc`) and C++ (`g++`) compiler. Dependency of `npm install...` and therefore `shadow-cljs`. | [Ubuntu Package: `build-essential`](https://packages.ubuntu.com/focal/build-essential) |\n| `make`                                              | Latest at build time. | Build automation tool, esp common for older C/C++ projects. Dependency of space-vim. | [Ubuntu Package: `build-essential`](https://packages.ubuntu.com/focal/build-essential) |\n| `cmake`                                             | Latest at build time. | Build automation tool, esp common for newer C/C++ projects. |  [Ubuntu Package: `cmake`](https://packages.ubuntu.com/focal/cmake) |\n| `zstd`                                              | Latest at build time. | Fast, lossless compression. Dependency of [`actions/cache@v2`](https://github.com/actions/cache). | [Ubuntu Package: `zstd`](https://packages.ubuntu.com/focal/zstd) |\n| `Xvfb`                                              | Latest at build time. | X virtual framebuffer. Dependency of running Chrome without a display in GitHub Actions. | [Ubuntu Package: `xvfb`](https://packages.ubuntu.com/focal/xvfb) |\n| `karma` CLI                                         | `2.0.0`               | Dependency of builds that use the [Karma test runner](https://karma-runner.github.io/latest/index.html). | [npm: `karma-cli`](https://www.npmjs.com/package/karma-cli) |\n| Chromium                                            | `56.0.2924.0`         | Used as a browser to execute Karma tests. This specific old version tracks the version of [Electron](https://www.electronjs.org/) that Day8 has deployed. | [Long storey](https://github.com/day8/dockerfiles-for-dev-ci-images/blob/5dd8bbc8032f9ed17fd75da378e4d03a3c00cd5b/Dockerfile#L334)  |\n| ChromeDriver                                        | `2.29`                | Dependency of executing Karma tests in Chromium. | [Project Website](https://chromedriver.chromium.org/) |\n\n## REPLs\n\nThe following [REPLs](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) are\navailable for exploratory programming and debugging of code snippets.\n\n| Name               | Language        | Example                                       |\n| ------------------ | --------------- | --------------------------------------------- | \n| 'Official' Clojure | Clojure         | `docker run -it --rm ghcr.io/day8/core:2 clojure`   |\n| Leiningen          | Clojure         | `docker run -it --rm ghcr.io/day8/core:2 lein repl` |\n| Node.js            | JavaScript      | `docker run -it --rm ghcr.io/day8/core:2 node`      |\n| Python 2           | Python 2        | `docker run -it --rm ghcr.io/day8/core:2 python2`   |\n| Python 3           | Python 3        | `docker run -it --rm ghcr.io/day8/core:2 python3`   |\n| Bash               | Bash            | `docker run -it --rm ghcr.io/day8/core:2 bash`      |\n\n## Command-Line Tools\n\nThe following tools are not usually required for builds (e.g. GitHub Actions). These are included for convenience and\nusability when using the image as an interactive shell.\n\n| Tool                              | Description | Origin |\n| --------------------------------- | --- | --- |\n| [`clj-kondo`](https://github.com/clj-kondo/clj-kondo) | A linter for Clojure code that sparks joy. | GitHub Releases Assets |\n| [`babashka`](https://github.com/babashka/babashka) | Native Clojure interpreter for scripting. | GitHub Releases Assets |\n| [`gh`](https://github.com/cli/cli/) | GitHub's official command line tool. | [GitHub Releases Assets: `gh_N.N.N_linux_amd64.deb`](https://github.com/cli/cli/releases) |\n| [`ssh`](https://www.openssh.com/) | OpenSSH client. | [Ubuntu Package: `openssh-client`](https://packages.ubuntu.com/focal/openssh-client) |\n\n## Why Not Docker Hub ?\n\nIn 2020 [Docker Hub introduced rate limiting](https://www.docker.com/blog/scaling-docker-to-serve-millions-more-developers-network-egress/)\nand around the same time [GitHub Actions finally fixed use of GitHub Container Registry](https://github.blog/changelog/2020-09-24-github-actions-private-registry-support-for-job-and-service-containers/).\n\nTherefore we no longer publish images to Docker Hub and use GitHub Container Registry instead.\n\n## GitHub Actions Example\n\n```yaml\njobs:\n  test:\n    name: Test\n    runs-on: ubuntu-latest\n    container:\n      image: ghcr.io/day8/chrome-latest:5.0.0\n      credentials:\n        username: ${{ github.actor }}\n        password: ${{ secrets.GLOBAL_TOKEN_FOR_GITHUB }} # \u003c-- you need to create a GitHub Secret with a manual token that has global access as github.token only has access to the current repo! \n```\n\n## Troubleshooting\n\n### Upgrading Chrome / Chromium\n\n#### Problem\n\nThe `day8/chrome-87:6.0.0` Docker image is provided as we need to test against a version equivalent to an old Electron version.\n\nWhen the version of Chromium used needs to be upgraded to match an Electron upgrade.\n\n#### Solution\n\nHold on to your hat and [walk this path](https://github.com/day8/dockerfiles-for-dev-ci-images/blob/5dd8bbc8032f9ed17fd75da378e4d03a3c00cd5b/Dockerfile#L334).\n\n### Karma - 'Gtk: cannot open display: :99'\n\n#### Problem\n\nWhen executing Karma tests an error similar to the following is displayed:\n```\n21 08 2020 12:10:13.052:ERROR [launcher]: ChromeHeadless stdout:\n21 08 2020 12:10:13.052:ERROR [launcher]: ChromeHeadless stderr: [0821/121012:ERROR:nacl_helper_linux.cc(311)] NaCl helper process running without a sandbox!\nMost likely you need to configure your SUID sandbox correctly\n[2442:2442:0821/121013:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display: :99\n```\n\n#### Solution\n\n`xvfb`, the X virtual framebuffer, is not running. This should be started by the \n`/docker-entrypoint.sh` script in the container which is the `ENTRYPOINT` of the Docker image. \n\nIf this error is occurring on GitHub Actions it may be because:\n1. GitHub Actions overrides the Docker image `ENTRYPOINT` with the `--entrypoint` CLI option to be \n   `/usr/bin/tail`.\n2. We replace `/usr/bin/tail` with an intercept script that executes `/docker-entrypoint.sh` before \n   executing the original tail at `/usr/bin/tail.original`.\n3. GitHub Actions has changed the `--entrypoint` option to something other than `/usr/bin/tail`.\n\n## Deployment\n\nSimply push a semver tag of the form `v1.2.3`. GitHub Actions will publish Docker images for \n`day8/core:1.2.3`, `day8/core:1.2` and `day8/core:1`. E.g.:\n\n```shell\n$ git tag v1.2.3 HEAD\n$ git push --tags\n```\n\n## License\n\nThis repository is [MIT licenced](license.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fday8%2Fdockerfiles-for-ci-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fday8%2Fdockerfiles-for-ci-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fday8%2Fdockerfiles-for-ci-images/lists"}