|
| 1 | +# Docker Images and Tags |
| 2 | + |
| 3 | +The Apache Superset community extensively uses Docker for development, release, |
| 4 | +and productionizing Superset. This page details our Docker builds and tag naming |
| 5 | +schemes to help users navigate our offerings. |
| 6 | + |
| 7 | +Images are built and pushed to the [Superset Docker Hub repository]( |
| 8 | +https://hub.docker.com/r/apache/superset). Different sets of images are created for: |
| 9 | +- Published releases, with tags like `3.0.0` and the `latest` tag. |
| 10 | +- Pull request iterations, each identified by tags starting with a SHA like |
| 11 | + `8a2f7d378ab13c156fa183d9284b607ed69f5ecc`, and `pr-3454`, referencing the pull |
| 12 | + request ID. |
| 13 | +- Merges to the main branch (`master`), resulting in new SHAs, with tags |
| 14 | + prefixed with `master` for the latest `master` version. |
| 15 | + |
| 16 | +Each code version has multiple builds for different purposes, identified by suffixes: |
| 17 | +- **Build preset:** We offer various images for different needs: |
| 18 | + - `lean`: The default Docker image, including both frontend and backend. Tags |
| 19 | + without a build_preset are lean builds, e.g., `latest`. |
| 20 | + - `dev`: For development, with a headless browser and root access. |
| 21 | + - `py310`, e.g., Py310: Similar to lean but with a different Python version (in this example, 3.10). |
| 22 | + - `ci`: For certain CI workloads. |
| 23 | + - `websocket`: For Superset clusters supporting advanced features. |
| 24 | + - `dockerize`: Used by Helm. |
| 25 | +- **Platform:** We build for `linux/arm64` and `linux/amd64`. The `-arm` suffix |
| 26 | + indicates ARM builds (e.g., `latest-arm`), while tags without a suffix are for |
| 27 | + AMD (e.g., `latest`). |
| 28 | + |
| 29 | +## Key Image Tags and Examples |
| 30 | + |
| 31 | +- `latest`: The latest official release build, implicitly the lean build on |
| 32 | + `linux/amd64`. |
| 33 | +- `latest-dev`: the `-dev` image of the latest official release build, with a headless browser and root access. |
| 34 | +- `master`: The latest build from the `master` branch, implicitly lean on |
| 35 | + `linux/amd64`. |
| 36 | +- `master-dev`: Similar to `master` but includes a headless browser and root access. |
| 37 | +- `pr-5252`: The latest commit in PR 5252. |
| 38 | +- `30948dc401b40982cb7c0dbf6ebbe443b2748c1b-dev-arm`: A `linux/arm64` build for |
| 39 | + this specific SHA, which could be from a pull request, master merge, or release. |
| 40 | +- `30948dc-dev-arm`: Same as above, but SHA truncated to 7 characters for a |
| 41 | + shorter handle on the same image |
| 42 | +- `websocket-latest`: The WebSocket image for use in a Superset cluster. |
| 43 | + |
| 44 | +For insights or modifications to the build matrix and tagging conventions, |
| 45 | +check the [build_docker.py](https://github.com/apache/superset/blob/master/scripts/build_docker.py) |
| 46 | +script and the [docker.yml](https://github.com/apache/superset/blob/master/.github/workflows/docker.yml) |
| 47 | +GitHub action. |
| 48 | + |
| 49 | +## Caching |
| 50 | + |
| 51 | +To accelerate builds, we follow Docker best practices and use `apache/superset-cache`. |
| 52 | + |
| 53 | +## On ARM builds and working with Apple silicon |
| 54 | + |
| 55 | +Apple's current generation of computers uses ARM-based CPUs, and Docker |
| 56 | +running on MACs seem to require `linux/arm64/v8` (at least one user's M2 was |
| 57 | +configured in that way). Setting the environment |
| 58 | +variable `DOCKER_DEFAULT_PLATFORM` to `linux/amd64` seems to function in |
| 59 | +term of leveraging, and building upon the Superset builds provided here. |
| 60 | + |
| 61 | +``` |
| 62 | +export DOCKER_DEFAULT_PLATFORM=linux/amd64 |
| 63 | +``` |
| 64 | + |
| 65 | +Presumably, `linux/arm64/v8` would be more optimized for this generation |
| 66 | +of chips, but less compatible across the ARM ecosystem. |
0 commit comments