aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2022-03-10 12:08:36 -0500
committertdro <tdro@users.noreply.github.com>2022-03-10 12:08:36 -0500
commite0670762e4d62d0e17375c9e62ac184648125e38 (patch)
treec2e7248ac55e8fa720b53b0b4d014c83ac98b0e6 /.bashrc
parent71d7d77cf368a0a0733e155a8b3eed813654624b (diff)
downloaddotfiles-e0670762e4d62d0e17375c9e62ac184648125e38.tar.gz
dotfiles-e0670762e4d62d0e17375c9e62ac184648125e38.tar.bz2
dotfiles-e0670762e4d62d0e17375c9e62ac184648125e38.zip
.bashrc: Simplify docker rootfs helper
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index a50f88d..07b9644 100644
--- a/.bashrc
+++ b/.bashrc
@@ -123,7 +123,10 @@ lxc-destroy() { for container in "$@"; do $(type -P lxc-destroy) --name "$contai
history-remove-duplicates() { awk '!visited[$0]++' "$HOME/.bash_history" | sponge "$HOME/.bash_history"; }
# extract docker container as rootfs
-docker-rootfs() { id=$(docker run -d "$1" /bin/true) && docker export "$id" -o "$2.tar" && docker container rm "$id"; }
+docker-rootfs() { id=$(docker run --detach "$1" /bin/true) \
+ && docker export "$id" --output "rootfs.tar" \
+ && docker container rm "$id" \
+ && ls -l rootfs.tar; }
# https://til.simonwillison.net/bash/escaping-a-string
# press ctrl+d after writing string to standard input