Skip to content

Commit f49a426

Browse files
mistercrunchsfirke
authored andcommitted
docs: document how docker-compose-image-tag requires -dev suffixed images (#30144)
Co-authored-by: Sam Firke <[email protected]> (cherry picked from commit 34e240e)
1 parent acf3e12 commit f49a426

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

docker-compose-image-tag.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# create you own docker environment file (docker/.env) with your own
2222
# unique random secure passwords and SECRET_KEY.
2323
# -----------------------------------------------------------------------
24-
x-superset-image: &superset-image apachesuperset.docker.scarf.sh/apache/superset:${TAG:-latest}
24+
x-superset-image: &superset-image apachesuperset.docker.scarf.sh/apache/superset:${TAG:-latest-dev}
2525
x-superset-depends-on: &superset-depends-on
2626
- db
2727
- redis
@@ -30,7 +30,6 @@ x-superset-volumes:
3030
- ./docker:/app/docker
3131
- superset_home:/app/superset_home
3232

33-
version: "3.7"
3433
services:
3534
redis:
3635
image: redis:7

docker-compose-non-dev.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ x-common-build: &common-build
3535
cache_from:
3636
- apache/superset-cache:3.10-slim-bookworm
3737

38-
version: "4.0"
3938
services:
4039
redis:
4140
image: redis:7

docs/docs/installation/docker-builds.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@ for the build, and/or base image.
3232
Here are the build presets that are exposed through the `build_docker.py` script:
3333

3434
- `lean`: The default Docker image, including both frontend and backend. Tags
35-
without a build_preset are lean builds, e.g., `latest`.
36-
- `dev`: For development, with a headless browser, dev-related utilities and root access.
35+
without a build_preset are lean builds (ie: `latest`, `4.0.0`, `3.0.0`, ...). `lean`
36+
builds do not contain database
37+
drivers, meaning you need to install your own. That applies to analytics databases **AND
38+
the metadata database**. You'll likely want to layer either `mysqlclient` or `psycopg2-binary`
39+
depending on the metadata database you choose for your installation, plus the required
40+
drivers to connect to your analytics database(s).
41+
- `dev`: For development, with a headless browser, dev-related utilities and root access. This
42+
includes some commonly used database drivers like `mysqlclient`, `psycopg2-binary` and
43+
some other used for development/CI
3744
- `py311`, e.g., Py311: Similar to lean but with a different Python version (in this example, 3.11).
3845
- `ci`: For certain CI workloads.
3946
- `websocket`: For Superset clusters supporting advanced features.

docs/docs/installation/docker-compose.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ Note that there are 3 major ways we support to run docker-compose:
3838
1. **docker-compose-image-tag.yml** where we fetch an image from docker-hub say for the
3939
`3.0.0` release for instance, and fire it up so you can try it. Here what's in
4040
the local branch has no effects on what's running, we just fetch and run
41-
pre-built images from docker-hub
41+
pre-built images from docker-hub. For `docker compose` to work along with the
42+
Postgres image it boots up, you'll want to point to a `-dev`-suffixed TAG, as in
43+
`export TAG=4.0.0-dev` or `export TAG=3.0.0-dev`, with `latest-dev` being the default.
44+
That's because The `dev` builds happen to package the `psycopg2-binary` required to connect
45+
to the Postgres database launched as part of the `docker compose` builds.
46+
``
4247

4348
More on these two approaches after setting up the requirements for either.
4449

0 commit comments

Comments
 (0)