{"id": 634821065, "node_id": "MDExOlB1bGxSZXF1ZXN0NjM0ODIxMDY1", "number": 1319, "state": "closed", "locked": 0, "title": "Add Docker multi-arch support with Buildx", "user": {"value": 10801138, "label": "blairdrummond"}, "body": "This adds Docker support to extra CPU architectures (like arm) using [Docker's Buildx action](https://github.com/marketplace/actions/docker-setup-buildx)\r\n\r\nYou can see [what that looks like on Dockerhub](https://hub.docker.com/r/blairdrummond/datasette/tags?page=1&ordering=last_updated)\r\n\r\nAnd how it lets Datasette run on a Raspberry Pi (top is my dockerhub, bottom is upstream)\r\n\r\n![Screenshot from 2021-05-08 15-32-25](https://user-images.githubusercontent.com/10801138/117551210-a17a9f80-b012-11eb-966b-10e1590dd4a9.png)\r\n\r\nThe workflow log [here](https://github.com/blairdrummond/datasette/runs/2535743398?check_suite_focus=true) (I subbed `blairdrummond` for datasetteproject in my branch) ", "created_at": "2021-05-08T19:35:03Z", "updated_at": "2021-05-27T16:49:24Z", "closed_at": "2021-05-27T16:49:24Z", "merged_at": "2021-05-27T16:49:23Z", "merge_commit_sha": "89822d10be0da446471986addea91d9766f12efb", "assignee": null, "milestone": null, "draft": 0, "head": "cfca570f9ca010ff9036c75209dc42e78bbc945f", "base": "1b697539f5b53cec3fe13c0f4ada13ba655c88c7", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1319", "merged_by": null, "auto_merge": null} {"id": 655726387, "node_id": "MDExOlB1bGxSZXF1ZXN0NjU1NzI2Mzg3", "number": 1347, "state": "closed", "locked": 0, "title": "Test docker platform blair only", "user": {"value": 10801138, "label": "blairdrummond"}, "body": "", "created_at": "2021-05-28T02:47:09Z", "updated_at": "2021-05-28T02:47:28Z", "closed_at": "2021-05-28T02:47:28Z", "merged_at": null, "merge_commit_sha": "e755dd8c8cf7149046a8b5fd44aec07c4b2416d3", "assignee": null, "milestone": null, "draft": 0, "head": "f730725fd260ba6578c472c344269d5d5df4e650", "base": "7b106e106000713bbee31b34d694b3dadbd4818c", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1347", "merged_by": null, "auto_merge": null} {"id": 655741428, "node_id": "MDExOlB1bGxSZXF1ZXN0NjU1NzQxNDI4", "number": 1348, "state": "open", "locked": 0, "title": "DRAFT: add test and scan for docker images", "user": {"value": 10801138, "label": "blairdrummond"}, "body": "**NOTE: I don't think this PR is ready, since the arm/v6 and arm/v7 images are failing pytest due to missing dependencies (gcc and friends). But it's pretty close.**\r\n\r\nCloses https://github.com/simonw/datasette/issues/1344 . Using a build-matrix for the platforms and [this test](https://github.com/simonw/datasette/issues/1344#issuecomment-849820019), we test all the platforms in parallel. I also threw in container scanning.\r\n\r\n### Switch `pip install` to use either tags or commit shas\r\n\r\nNotably! This also [changes the Dockerfile](https://github.com/blairdrummond/datasette/blob/7fe5315d68e04fce64b5bebf4e2d7feec44f8546/Dockerfile#L20) so that it accepts tags or commit-shas.\r\n\r\n```\r\n# It's backwards compatible with tags, but also lets you use shas\r\nroot@712071df17af:/# pip install git+git://github.com/simonw/datasette.git@0.56 \r\nCollecting git+git://github.com/simonw/datasette.git@0.56 \r\n Cloning git://github.com/simonw/datasette.git (to revision 0.56) to /tmp/pip-req-build-u6dhm945 \r\n Running command git clone -q git://github.com/simonw/datasette.git /tmp/pip-req-build-u6dhm945 \r\n Running command git checkout -q af5a7f1c09f6a902bb2a25e8edf39c7034d2e5de \r\nCollecting Jinja2<2.12.0,>=2.10.3 \r\n Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB) \r\n```\r\n\r\nThis lets you build the containers in CI every push for testing, which maybe resolves [this problem](https://github.com/simonw/datasette/issues/1272#issuecomment-808648974)?\r\n\r\n# Workflow run example\r\n\r\nYou can see the results in my workflow [here](https://github.com/blairdrummond/datasette/pull/2/checks?check_run_id=2690570717). The commit history is different because I squashed this branch, also in the testing branch I had to change `github.com/simonw` to `github.com/blairdrummond` for the CI to pick up my git_sha.\r\n\r\n## Why did the builds fail?\r\n\r\n**NOTE:** The results of all the tests fail, but for different reasons! A few fail to install Rust, the amd64 passes the tests (phew!) but has critical CVEs which fail the container scan, the Arm/v6 and Arm/v7 seem to fail to install the test dependencies due to missing programs like `gcc`. (`gcc` is not sufficient though, as [this run](https://github.com/blairdrummond/datasette/pull/3/checks?check_run_id=2690672982) indicates) ", "created_at": "2021-05-28T03:02:12Z", "updated_at": "2021-05-28T03:06:16Z", "closed_at": null, "merged_at": null, "merge_commit_sha": "eeea7cb835be0f0319cafccf50dffa6ad26826c5", "assignee": null, "milestone": null, "draft": 0, "head": "56cba8fb837cd938c2f9d7423ee43d62a81c8f7c", "base": "7b106e106000713bbee31b34d694b3dadbd4818c", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1348", "merged_by": null, "auto_merge": null}