From 0bd08641b7140ed556c50c993748b1b3b970d4d3 Mon Sep 17 00:00:00 2001 From: Adrian Malacoda <adrian.malacoda@monarch-pass.net> Date: Mon, 30 Jul 2018 10:09:04 -0500 Subject: [PATCH] cd to /data before running tool. The tool has to be run in /data since it expects `discord-registration.yaml` to be in the working directory. However, the bridge itself can't be run from /data because it expects to be able to load the config schema from path relative to the working directory. The tools don't seem to need this schema and seem to run fine from /data. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0313f1e..534ed78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN apk add --no-cache -t build-deps make gcc g++ python ca-certificates libc-de && cd / \ && rm -rf /tmp/* \ && apk del build-deps \ - && sh -c 'cd /build/tools; for TOOL in *.js; do LINK="/usr/bin/$(basename $TOOL .js)"; echo -e "#!/bin/sh\nnode /build/tools/$TOOL \$@" > $LINK; chmod +x $LINK; done' + && sh -c 'cd /build/tools; for TOOL in *.js; do LINK="/usr/bin/$(basename $TOOL .js)"; echo -e "#!/bin/sh\ncd /data;\nnode /build/tools/$TOOL \$@" > $LINK; chmod +x $LINK; done' ENV NODE_ENV=production -- GitLab