mirror of
https://github.com/ptarmiganlabs/butler-sos.git
synced 2025-12-19 17:58:18 -05:00
First commit
This commit is contained in:
23
Dockerfile
Normal file
23
Dockerfile
Normal 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"]
|
||||
|
||||
Reference in New Issue
Block a user