Skip to content

Commit

Permalink
Added dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
martinzuern committed May 30, 2017
1 parent 0414b6d commit e827816
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
21 changes: 13 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
FROM node:6

WORKDIR /usr/app
ENV TINI_VERSION v0.14.0

RUN useradd -ms /bin/bash aws-es-proxy
RUN chown aws-es-proxy:aws-es-proxy /usr/app
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ADD index.js /usr/app
ADD package.json /usr/app
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
ADD package.json /usr/src/app/
RUN npm install && npm cache clean
COPY . /usr/src/app

RUN npm install
# Add Tini
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]

EXPOSE 9200

ENTRYPOINT ["node", "index.js"]
CMD [ "bin/aws-es-proxy" , "--"]

0 comments on commit e827816

Please sign in to comment.