From 57b21c750d8c4a535f87c6e452d39781a4674568 Mon Sep 17 00:00:00 2001 From: marmous Date: Fri, 8 Jan 2021 14:34:22 +0100 Subject: [PATCH 1/2] Add docker support --- Dockerfile | 5 +++++ README.md | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1d89afe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.8-alpine +RUN pip install csv-diff +WORKDIR /files +ENTRYPOINT ["csv-diff"] +CMD ["--help"] \ No newline at end of file diff --git a/README.md b/README.md index d9cd76f..e05f41d 100644 --- a/README.md +++ b/README.md @@ -110,3 +110,17 @@ You can also import the Python library into your own code like so: `diff` will now contain the same data structure as the output in the `--json` example above. If the columns in the CSV have changed, those added or removed columns will be ignored when calculating changes made to specific rows. + +## As a Docker container + +### Build the image + + $ docker build -t csvdiff . + +### Run the container + + $ docker run --rm -v $(pwd):/files csvdiff + +Suppose current directory contains two csv files : one.csv two.csv + + $ docker run --rm -v $(pwd):/files csvdiff one.csv two.csv \ No newline at end of file From 096cd8747ec896e420ca48d06485d9944e1f7f47 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 22 Feb 2021 17:15:17 -0800 Subject: [PATCH 2/2] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1d89afe..d91ad1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,4 @@ FROM python:3.8-alpine RUN pip install csv-diff WORKDIR /files ENTRYPOINT ["csv-diff"] -CMD ["--help"] \ No newline at end of file +CMD ["--help"]