|
|
Dockerizing the project is challenging because of two things:
|
|
|
1. the classpath setup done in [start_component.sh](implementation/start_component.sh)
|
|
|
1. the classpath setup done in [start_component.sh](/implementation/start_component.sh)
|
|
|
2. the GPIO pins of the Raspberry Pi must be accessible from inside the container for the lights
|
|
|
|
|
|
## Dockerfile Walkthrough
|
... | ... | @@ -148,7 +148,7 @@ Starting the container for any component that does not need access to the GPIO p |
|
|
```
|
|
|
- `-d` detaches the container, if you want to run it in the foreground omit it.
|
|
|
- `-e COMPONENT=registry` sets the environment variable `COMPONENT`. **This determines which component is started, be sure to set it to the correct component!**
|
|
|
- `-e ...` sets all other environment variables. See the [run_demo.sh documentation](implementation/run_demo.sh) for more information.
|
|
|
- `-e ...` sets all other environment variables. See the [run_demo.sh documentation](/implementation/run_demo.sh) for more information.
|
|
|
|
|
|
#### Stopping the Container
|
|
|
If you run the container in the foreground just press `Ctrl+C`.
|
... | ... | @@ -175,7 +175,7 @@ The easiest way to do this (and the only one I found working) is to use the foll |
|
|
- `-e COMPONENT=lights` same as above
|
|
|
- `-v "/usr/bin/raspi-gpio:/bin/raspi-gpio"` mounts the `raspi-gpio` executable inside the container. **You have to have `raspi-gpio` installed on the host system!**
|
|
|
- `--privileged` ensures access to host devices (eg. GPIO)
|
|
|
- `-e ...` sets all other environment variables. See the [run_demo.sh documentation](implementation/run_demo.sh) for more information.
|
|
|
- `-e ...` sets all other environment variables. See the [run_demo.sh documentation](/implementation/run_demo.sh) for more information.
|
|
|
|
|
|
For how to stop the container see above.
|
|
|
|
... | ... | |