From 922d69452b58b9963c7f67b5e45f07c10923c51b Mon Sep 17 00:00:00 2001
From: Adrian Malacoda <adrian.malacoda@monarch-pass.net>
Date: Sat, 28 Jul 2018 13:00:41 -0500
Subject: [PATCH] Generate links to tools in /usr/bin

---
 Dockerfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 85f549b..3f2662c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,7 +10,8 @@ RUN apk add --no-cache -t build-deps make gcc g++ python ca-certificates libc-de
     && mv node_modules / \
     && cd / \
     && rm -rf /tmp/* \
-    && apk del build-deps
+    && 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'
 
 ENV NODE_ENV=production
 
-- 
GitLab