diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d91ad1a --- /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"] 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