forked from mongo-express/mongo-express
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the dockerfile from knickers/mongo-express
- Loading branch information
Showing
1 changed file
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
FROM node:latest | ||
FROM node:0.12-slim | ||
|
||
WORKDIR /app | ||
ADD . /app | ||
ENV TINI_VERSION 0.5.0 | ||
RUN set -x \ | ||
&& apt-get update && apt-get install -y ca-certificates curl \ | ||
--no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& curl -fSL "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini" -o /usr/local/bin/tini \ | ||
&& chmod +x /usr/local/bin/tini \ | ||
&& tini -h \ | ||
&& apt-get purge --auto-remove -y ca-certificates curl | ||
|
||
RUN npm install | ||
RUN cp config.default.js config.js | ||
ENV MONGO_EXPRESS 0.27.5 | ||
|
||
EXPOSE 8081 | ||
RUN npm install mongo-express@$MONGO_EXPRESS | ||
|
||
WORKDIR /node_modules/mongo-express | ||
|
||
CMD ["npm", "start"] | ||
RUN cp config.default.js config.js | ||
|
||
ENV ME_CONFIG_MONGODB_SERVER="mongo" | ||
ENV ME_CONFIG_BASICAUTH_USERNAME="" | ||
ENV ME_CONFIG_BASICAUTH_PASSWORD="" | ||
|
||
EXPOSE 8081 | ||
CMD ["tini", "--", "node", "app"] |