From 6857b858e057631ab073ebc7146cd8729d2eff06 Mon Sep 17 00:00:00 2001 From: Thomas Johnston Date: Sun, 10 May 2020 04:53:43 -0700 Subject: [PATCH 1/2] Adding Dockerfile to run nwsync utils in a container --- Dockerfile | 10 ++++++++++ README.md | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6d8cde5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM nimlang/nim:alpine + +COPY . /nwsync + +RUN apk --no-cache add curl unzip pcre \ + && cd nwsync \ + && nimble install -y \ + && cd - + +ENV PATH="/nwsync/bin:${PATH}" diff --git a/README.md b/README.md index 16d8e4b..483df98 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,13 @@ To build these tools, first install the most recent nim compiler. The suggested After nim is installed and available on your path, simply clone this repository and type `nimble build -d:release`. +### Using with docker + +```bash +docker build --rm -t Beamdog/nwsync:dev . +docker run --rm -w /manifests -v $(pwd):/manifests Beamdog/nwsync:dev nwsync_write --compression="none" nwsync module.mod +``` + ## Documentation There is a technical user manual available at https://docs.google.com/document/d/1eYRTd6vzk7OrLpr2zlwnUk7mgUsyiZzLoR6k54njBVI. From 8b0bea13667a72b8784bb0d111e47f65f6ca1ae2 Mon Sep 17 00:00:00 2001 From: Thomas Johnston Date: Sun, 10 May 2020 05:01:09 -0700 Subject: [PATCH 2/2] Removing some apk adds that aren't applicable anymore --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6d8cde5..a5b0e2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM nimlang/nim:alpine COPY . /nwsync -RUN apk --no-cache add curl unzip pcre \ +RUN apk --no-cache add pcre \ && cd nwsync \ && nimble install -y \ && cd -