From 5285d393a046d971039bc67cf05157dad2a04ee2 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 6 Mar 2018 10:59:40 +0000 Subject: [PATCH] set entry point for dockerfile --- services/clsi/Dockerfile | 3 +-- services/clsi/docker-compose.yml | 2 +- services/clsi/entrypoint.sh | 5 +++++ 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100755 services/clsi/entrypoint.sh diff --git a/services/clsi/Dockerfile b/services/clsi/Dockerfile index 58266614e4..db863cda42 100644 --- a/services/clsi/Dockerfile +++ b/services/clsi/Dockerfile @@ -23,5 +23,4 @@ RUN useradd --user-group --create-home --home-dir /app --shell /bin/false app RUN [ -e ./install_deps.sh ] && ./install_deps.sh -# USER app -CMD ["node","app.js"] +ENTRYPOINT ["/bin/sh", "entrypoint.sh"] diff --git a/services/clsi/docker-compose.yml b/services/clsi/docker-compose.yml index 2469482bfb..e6af23b152 100644 --- a/services/clsi/docker-compose.yml +++ b/services/clsi/docker-compose.yml @@ -21,7 +21,7 @@ services: extends: file: docker-compose-config.yml service: dev - entrypoint: npm run test:acceptance + command: npm run test:acceptance redis: image: redis diff --git a/services/clsi/entrypoint.sh b/services/clsi/entrypoint.sh new file mode 100755 index 0000000000..588854ed1e --- /dev/null +++ b/services/clsi/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "Changing permissions of /var/run/docker.sock for sibling containers" +chown root:docker /var/run/docker.sock +exec runuser -u app "$@" \ No newline at end of file