@@ -51,6 +51,7 @@ smith(){
5151 sudo docker run -it --rm \
5252 --privileged -v $PWD:/write \
5353 -v cache:/var/cache \
54+ -v /tmp:/tmp
5455 -v mock:/var/lib/mock [<docker-repo-id>/]smith $@
5556}
5657```
@@ -142,25 +143,39 @@ reinstalling the package.
142143
143144## Building Microcontainers ##
144145
145- To build a container with ` smith ` , create a smith.yaml file and invoke smith with no
146- parameters:
146+ To build a "hello world" container with ` smith ` :
147+ 1 . Create a new directory and cd to it
147148
148- mkdir cat
149- cd cat
149+ ```
150+ mkdir cat
151+ cd cat
152+ ```
150153
151- cat >smith.yaml <<EOF
152- package: coreutils
153- paths:
154- - /usr/bin/cat
155- cmd:
156- - /usr/bin/cat
157- - /read/data
158- EOF
154+ 2 . Create a ` smith.yaml ` file with the following contents:
155+ ```
156+ package: coreutils
157+ paths:
158+ - /usr/bin/cat
159+ cmd:
160+ - /usr/bin/cat
161+ - /read/data
162+ ```
163+
164+ 3 . Create the rootfs directory. Smith will put the contents of the ` ./rootfs ` directory into the root directory of the image.
165+
166+ ` mkdir rootfs `
167+
168+ 4 . Create the ` read ` directory under rootfs
169+
170+ ` mkdir rootfs/read `
171+
172+ 5 . Create the file ` data ` under ` rootfs/read ` with the following content:
173+
174+ ` Hello World! `
159175
160- mkdir -p rootfs/read
161- echo "Hello World!" >rootfs/read/data
176+ - invoke smith with no parameters:
162177
163- smith
178+ ` smith `
164179
165180Your image will be saved as image.tar.gz. You can change the name with a
166181parameter:
@@ -200,9 +215,9 @@ smith(){
200215
201216## Advanced Usage ##
202217
203- For more detailed instructions on building containers, check out [ How To Build
204- a Tiny Httpd
205- Container] ( https://hackernoon.com/how-to-build-a-tiny-httpd-container-ae622c37db39 )
218+ For more detailed instructions on building containers, check out:
219+ - [ Smith Lab ] ( https://github.com/crush-157/smith-lab )
220+ - [ How To Build a Tiny Httpd Container] ( https://hackernoon.com/how-to-build-a-tiny-httpd-container-ae622c37db39 )
206221
207222## Upload ##
208223
0 commit comments