You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
48
-
49
-
```shell
50
-
docker run -it --rm -v ${PWD}:/image/scripts --entrypoint bash mc-dev
51
-
```
52
-
53
-
From within the container you can run individual scripts via the attached `/image/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
54
-
55
-
```shell
56
-
export VERSION=1.12.2
57
-
/image/scripts/start-deployFabric
58
-
```
59
-
60
-
...or pre-pending script execution:
14
+
The included `compose-dev.yml` will mount the local `scripts` code into the container and allow for iterative development. Replace `[-e key=value]` with any environment variables you wish to set for testing the modified scripts.
61
15
62
16
```shell
63
-
VERSION=1.12.2 /image/scripts/start-deployFabric
17
+
docker compose -f compose-dev.yml run --rm -it [-e key=value] mc-dev
64
18
```
65
19
66
-
!!! note
20
+
!!! tip
67
21
68
-
You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
22
+
To speed up the development cycle, it is recommended to set `SETUP_ONLY` to `true` as part of the run command above.
0 commit comments