@@ -27,21 +27,41 @@ example](https://github.com/BobBuildTool/bob-example-embedded).
2727
2828# How to build
2929
30- Clone the recipes and build them with Bob:
30+ First of all you have to clone the recipes and change to the checked-out
31+ directory:
3132
3233 $ git clone https://github.com/BobBuildTool/bob-example-containers.git \
3334 --recurse-submodules
3435 $ cd bob-example-containers
36+
37+ The next steps depend on what you want to build.
38+
39+ ## Docker Container
40+
41+ These recipes can build a minimal container image that has solely lighttpd and
42+ the required dependencies installed by running the following command:
43+
44+ $ # Still in the bob-example-containers directory
3545 $ bob build containers::lighttpd
3646
37- These recipes build a minimal container image that has solely lighttpd and the
38- required dependencies installed.
47+ ## Systemd Portable Service
48+
49+ These recipes can also provide a systemd portable service that can be attached
50+ with ` portablectl ` by issuing the following command:
51+
52+ $ # Still in the bob-example-containers directory
53+ $ bob build containers::lighttpd-image
3954
4055# How to use
4156
57+ Again, usage of the build products depends on the chosen target.
58+
59+ ## Docker Container
60+
4261To use it you have to import it in Docker:
4362
44- $ # Still in the bob-example-containers directory
63+ $ # Still in the bob-example-containers directory after building
64+ $ # containers::lighttpd
4565 $ tar -C $(bob query-path -f '{dist}' --release containers::lighttpd) -c . \
4666 | docker import - lighttpd
4767
@@ -53,6 +73,20 @@ Now you can serve any host directory with the lighttpd in the image:
5373
5474This will expose the lighttpd at port 8080 on your host.
5575
76+ ## Systemd Portable Service
77+
78+ First you have to import the portable service:
79+
80+ $ # Still in the bob-example-containers directory after building
81+ $ # containers::lighttpd-image
82+ $ portablectl attach $(bob query-path -f '{dist}' --release containers::lighttpd-image)/lighttpd.raw
83+
84+ Now you can start the lighttpd as any other systemd service on your host:
85+
86+ $ systemctl start lighttpd.service
87+
88+ lighttpd should now listen on port 80.
89+
5690# Contributions
5791
5892Contributions are welcome in form of feedback, bug reports and code. If you want
0 commit comments