This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new d4888fa4af docs: adapt docs to suggest 'docker compose up --build'
(#30864)
d4888fa4af is described below
commit d4888fa4af0c48ed7afc10757fdec1045a191b6a
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Mon Dec 2 18:03:13 2024 -0800
docs: adapt docs to suggest 'docker compose up --build' (#30864)
---
docs/docs/contributing/development.mdx | 8 +++++---
docs/docs/installation/docker-compose.mdx | 11 ++++++++++-
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/docs/docs/contributing/development.mdx
b/docs/docs/contributing/development.mdx
index b9b05fb890..6ff2c42132 100644
--- a/docs/docs/contributing/development.mdx
+++ b/docs/docs/contributing/development.mdx
@@ -32,7 +32,9 @@ cd superset
Setting things up to squeeze a "hello world" into any part of Superset should
be as simple as
```bash
-docker compose up
+# getting docker compose to fire up services, and rebuilding if some docker
layers have changed
+# using the `--build` suffix may be slower and optional if layers like py
dependencies haven't changed
+docker compose up --build
```
Note that:
@@ -694,7 +696,7 @@ If you already have launched Docker environment please use
the following command
Launch environment:
-`CYPRESS_CONFIG=true docker compose up`
+`CYPRESS_CONFIG=true docker compose up --build`
It will serve the backend and frontend on port 8088.
@@ -762,7 +764,7 @@ superset:
Start Superset as usual
```bash
-docker compose up
+docker compose up --build
```
Install the required libraries and packages to the docker container
diff --git a/docs/docs/installation/docker-compose.mdx
b/docs/docs/installation/docker-compose.mdx
index 1ba3cd6d1e..67fe3d50c3 100644
--- a/docs/docs/installation/docker-compose.mdx
+++ b/docs/docs/installation/docker-compose.mdx
@@ -76,7 +76,8 @@ on latest base images using `docker compose build --pull`. In
most cases though,
### Option #1 - for an interactive development environment
```bash
-docker compose up
+# The --build argument insures all the layers are up-to-date
+docker compose up --build
```
:::tip
@@ -235,3 +236,11 @@ may want to find the exact hostname you want to use, for
that you can do `ifconf
Docker for you. Alternately if you don't even see the `docker0` interface try
(if needed with sudo)
`docker network inspect bridge` and see if there is an entry for `"Gateway"`
and note the IP
address.
+
+## 4. To build or not to build
+
+When running `docker compose up`, docker will build what is required behind
the scene, but
+may use the docker cache if assets already exist. Running `docker compose
build` prior to
+`docker compose up` or the equivalent shortcut `docker compose up --build`
ensures that your
+docker images matche the definition in the repository. This should only apply
to the main
+docker-compose.yml file (default) and not to the alternative methods defined
above.