diff options
author | tdro <tdro@users.noreply.github.com> | 2022-03-10 12:08:36 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2022-03-10 12:08:36 -0500 |
commit | e0670762e4d62d0e17375c9e62ac184648125e38 (patch) | |
tree | c2e7248ac55e8fa720b53b0b4d014c83ac98b0e6 /.bashrc | |
parent | 71d7d77cf368a0a0733e155a8b3eed813654624b (diff) | |
download | dotfiles-e0670762e4d62d0e17375c9e62ac184648125e38.tar.gz dotfiles-e0670762e4d62d0e17375c9e62ac184648125e38.tar.bz2 dotfiles-e0670762e4d62d0e17375c9e62ac184648125e38.zip |
.bashrc: Simplify docker rootfs helper
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |