Merge pull request #13 from turt2live/travis/dockerfile

Add a simple Dockerfile
This commit is contained in:
Will Hunt 2019-08-04 01:46:59 +01:00 committed by GitHub
commit 0b5c653d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
node_modules/
lib/
config.yml

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
# Stage 0: Build the thing
FROM node:12-alpine AS builder
COPY . /src
WORKDIR /src
RUN npm install
RUN npm run build
# Stage 1: The actual container
FROM node:12-alpine
COPY --from=builder /src/lib/* /bin/matrix-github/
COPY --from=builder /src/package*.json /bin/matrix-github/
WORKDIR /bin/matrix-github
RUN npm install --production
VOLUME /data
EXPOSE 9993
EXPOSE 7775
CMD ["node", "app.js", "/data/config.yaml", "/data/registration.yml"]