docs: adapt docs to suggest 'docker compose up --build' (#30864)

This commit is contained in:
Maxime Beauchemin 2024-12-02 18:03:13 -08:00 committed by GitHub
parent b3559f644c
commit d4888fa4af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 4 deletions

View File

@ -32,7 +32,9 @@ cd superset
Setting things up to squeeze a "hello world" into any part of Superset should be as simple as Setting things up to squeeze a "hello world" into any part of Superset should be as simple as
```bash ```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: Note that:
@ -694,7 +696,7 @@ If you already have launched Docker environment please use the following command
Launch environment: 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. It will serve the backend and frontend on port 8088.
@ -762,7 +764,7 @@ superset:
Start Superset as usual Start Superset as usual
```bash ```bash
docker compose up docker compose up --build
``` ```
Install the required libraries and packages to the docker container Install the required libraries and packages to the docker container

View File

@ -76,7 +76,8 @@ on latest base images using `docker compose build --pull`. In most cases though,
### Option #1 - for an interactive development environment ### Option #1 - for an interactive development environment
```bash ```bash
docker compose up # The --build argument insures all the layers are up-to-date
docker compose up --build
``` ```
:::tip :::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 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 `docker network inspect bridge` and see if there is an entry for `"Gateway"` and note the IP
address. 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.