set entry point for dockerfile

This commit is contained in:
Henry Oswald
2018-03-06 10:59:40 +00:00
parent 96a237fb74
commit aca9100c52
3 changed files with 7 additions and 3 deletions

View File

@@ -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 RUN [ -e ./install_deps.sh ] && ./install_deps.sh
# USER app ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
CMD ["node","app.js"]

View File

@@ -21,7 +21,7 @@ services:
extends: extends:
file: docker-compose-config.yml file: docker-compose-config.yml
service: dev service: dev
entrypoint: npm run test:acceptance command: npm run test:acceptance
redis: redis:
image: redis image: redis

5
entrypoint.sh Executable file
View File

@@ -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 "$@"