First commit

This commit is contained in:
Göran Sander
2018-10-11 20:35:28 +02:00
parent 3eb98f4058
commit 2182a3f38f

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# Use Node 8 LTS
FROM node:8
# Create app dir inside container
WORKDIR /nodeapp
# Install app dependencies separately (creating a separate layer for node_modules, effectively caching them between image rebuilds)
COPY package.json .
RUN npm install
# Copy app's source files
COPY . .
# Create and use non-root user
RUN groupadd -r nodejs \
&& useradd -m -r -g nodejs nodejs
USER nodejs
CMD ["node", "butler-sos.js"]