@@ -23,6 +23,47 @@ Or relevant sources pages, to get started head to:
2323
2424## Quickstart
2525
26+ ### Docker build
27+
28+ The fastest (less than 20min) way to build z-wave-protocol-controller from scratch
29+ is to delegate all tasks to docker. The final image will contain the binaries that
30+ you can use.
31+
32+ ``` sh
33+ docker build https://github.com/SiliconLabsSoftware/z-wave-protocol-controller.git#ver_1.7.0
34+ ```
35+
36+ This one-liner will do download latest release, setup environment, build, test, package...
37+
38+ Also a docker-compose file is provided to start ZPC and use it along a MQTT client
39+ (eg:
40+ [ mosquitto-clients] ( https://github.com/eclipse-mosquitto/mosquitto/ )
41+ ).
42+
43+ ### Docker development
44+
45+ The project Dockerfile has three stages: ` dev ` (setup only, for interactive
46+ use), ` builder ` (full build and package), and ` runtime ` (minimal runnable
47+ image). To work iteratively in a container with your host source bind-mounted
48+ (e.g., build and run ctest without rebuilding the image each time):
49+
50+ ``` sh
51+ # Build the dev stage
52+ docker build --target dev -t z-wave-protocol-controller:dev .
53+
54+ # Run a shell with your source mounted
55+ docker run -it --rm -v " $PWD :/usr/local/opt/z-wave-protocol-controller" -w /usr/local/opt/z-wave-protocol-controller z-wave-protocol-controller:dev
56+
57+ # Inside the container: build and run unit tests
58+ ./helper.mk default
59+
60+ # Run unit tests
61+ ctest --test-dir build/applications --output-on-failure
62+ ```
63+
64+ Power users might prefer to work in sources tree in a native GNU/Linux
65+ environment as explained below.
66+
2667### Native (Linux) build
2768
2869The project is CMake based, to prepare the environment,
@@ -136,7 +177,7 @@ You can use this [script](./scripts/wslusb.ps1).
136177Start by installing the usbipd service as described at: https://learn.microsoft.com/en-us/windows/wsl/connect-usb
137178
138179``` sh
139- # You can list devices using:
180+ # You can list devices using:
140181
141182(Powershell)$ ./wslusb.ps1 -List
142183
@@ -157,26 +198,6 @@ Start by installing the usbipd service as described at: https://learn.microsoft.
157198
158199Refer to [ ./doc] ( doc ) for more (using shell, MQTT, WebApp etc).
159200
160-
161- ### Docker build
162-
163- The fastest (less than 20min) way to build z-wave-protocol-controller from scratch
164- is to delegate all tasks to docker.
165-
166- ``` sh
167- docker build https://github.com/SiliconLabsSoftware/z-wave-protocol-controller.git#ver_1.7.0
168- ```
169-
170- This one-liner will do download latest release, setup environment, build, test, package...
171-
172- Also a docker-compose file is provided to start ZPC and use it along a MQTT client
173- (eg:
174- [ mosquitto-clients] ( https://github.com/eclipse-mosquitto/mosquitto/ )
175- ).
176-
177- Power users might prefer to work in sources tree in a native GNU/Linux
178- environment as explained above.
179-
180201## Contributing
181202
182203- [ CONTRIBUTING.md] ( CONTRIBUTING.md )
0 commit comments