From be532bf2fe543f0b25385a6bf7887336c9f58cf6 Mon Sep 17 00:00:00 2001 From: Eduardo Minguez Perez Date: Fri, 7 Jun 2019 14:16:24 +0200 Subject: [PATCH] Added '-rm' docker flag to remove the containers Also, added a handy alias just in case. --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e56c9cb3..26af3ff2 100644 --- a/README.md +++ b/README.md @@ -51,13 +51,19 @@ go get gopkg.in/mikefarah/yq.v2 Oneshot use: ```bash -docker run -v ${PWD}:/workdir mikefarah/yq yq [flags] FILE... +docker run -rm -v ${PWD}:/workdir mikefarah/yq yq [flags] FILE... ``` Run commands interactively: ```bash -docker run -it -v ${PWD}:/workdir mikefarah/yq sh +docker run -rm -it -v ${PWD}:/workdir mikefarah/yq sh +``` + +It can be useful to have a bash alias to avoid typing the whole docker command: + +```bash +alias yq="docker run -rm -v ${PWD}:/workdir mikefarah/yq yq" ``` ## Features