2017-09-24 15:44:49 -04:00
|
|
|
FROM mhart/alpine-node:latest
|
|
|
|
|
|
|
|
# Create app directory
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# Install app dependencies
|
2018-02-27 19:19:14 -05:00
|
|
|
COPY package.json ./
|
|
|
|
RUN yarn install
|
2017-09-24 15:44:49 -04:00
|
|
|
|
|
|
|
# Bundle app source
|
|
|
|
COPY . .
|
|
|
|
|
2017-10-01 16:46:05 -04:00
|
|
|
RUN addgroup -S app -g 50000 && \
|
2018-01-20 00:11:52 -05:00
|
|
|
adduser -S -g app -u 50000 app && \
|
|
|
|
mkdir /data && chown app:app /data/
|
|
|
|
|
2017-10-01 16:46:05 -04:00
|
|
|
USER app
|
|
|
|
|
2017-10-04 22:21:36 -04:00
|
|
|
ENTRYPOINT [ "node", "src/server.js" ]
|