Skip to content

Commit

Permalink
Rearrange the dockerfile for more efficient builds
Browse files Browse the repository at this point in the history
  • Loading branch information
knickers committed Feb 20, 2016
1 parent fecd5d5 commit b99612f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ RUN set -x \
&& apt-get purge --auto-remove -y ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 8081

# override some config defaults with values that will work better for docker
ENV ME_CONFIG_MONGODB_SERVER="mongo"
ENV ME_CONFIG_MONGODB_ENABLE_ADMIN="true"
ENV VCAP_APP_HOST="0.0.0.0"

WORKDIR /app

COPY . /app

RUN npm install
RUN cp config.default.js config.js

ENV ME_CONFIG_MONGODB_SERVER="mongo"
ENV ME_CONFIG_MONGODB_ENABLE_ADMIN="true"
ENV VCAP_APP_HOST="0.0.0.0"
RUN npm install

EXPOSE 8081
CMD ["tini", "--", "npm", "start"]

0 comments on commit b99612f

Please sign in to comment.