cookbook/container: example of building+running docker containers.
This got... long... and complicated. But I think it's a really good demonstration of getting redo to do complicated things elegantly. At least, I hope it is.
This commit is contained in:
parent
01497f55e9
commit
3923a7d3f8
38 changed files with 1375 additions and 7 deletions
14
docs/cookbook/container/debdownload.fs.do
Normal file
14
docs/cookbook/container/debdownload.fs.do
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
exec >&2
|
||||
fs=${1%.fs}
|
||||
|
||||
# let's *not* delete this directory; it's okay if previously-downloaded
|
||||
# excess packages hang around in case we need them later.
|
||||
#rm -rf "$fs"
|
||||
mkdir -p "$fs"
|
||||
redo-ifchange debootstrap.options
|
||||
debootstrap \
|
||||
--download-only \
|
||||
--keep-debootstrap-dir \
|
||||
$(cat debootstrap.options) \
|
||||
"$fs"
|
||||
redo-ifchange "$fs/debootstrap/debootstrap.log"
|
||||
Loading…
Add table
Add a link
Reference in a new issue