diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0648b8b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,18 @@ +deploy/ +coverage/ +node_modules/ +.dockerignore +.editorconfig +.git/ +.gitignore +.istanbul.yml +circle.yml +docker-compose.circle.yml +docker-compose.dev.yml +docker-compose.functional.yml +docker-compose.yml +Dockerfile +LICENSE +README.md + +sonar-project.properties diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6b9bd1a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM mhart/alpine-node:8.9.4 +USER root + +WORKDIR /opt/central-event-processor +COPY src /opt/central-event-processor/src +COPY config /opt/central-event-processor/config +COPY package.json /opt/central-event-processor/ +COPY app.js /opt/central-event-processor/ +COPY docs /opt/central-event-processor/docs + +RUN apk --no-cache add git +RUN apk add --no-cache -t build-dependencies make gcc g++ python libtool autoconf automake \ + && cd $(npm root -g)/npm \ + && npm config set unsafe-perm true \ + && npm install -g node-gyp + +RUN npm install --production && \ + npm uninstall -g npm + +RUN apk del build-dependencies + +EXPOSE 3080 +CMD node app.js