forked from mongo-express/mongo-express
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (42 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM node:12-slim
# grab tini for signal processing and zombie killing
ENV TINI_VERSION 0.9.0
RUN set -x \
&& apt-get update && apt-get install -y ca-certificates curl \
--no-install-recommends \
&& apt-get install -y gpg \
&& curl -fSL "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini" -o /usr/local/bin/tini \
&& curl -fSL "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini.asc" -o /usr/local/bin/tini.asc \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \
&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \
&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc \
&& chmod +x /usr/local/bin/tini \
&& tini -h \
&& 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_EDITORTHEME="default" \
ME_CONFIG_MONGODB_URL="mongodb://mongo:27017" \
ME_CONFIG_MONGODB_ENABLE_ADMIN="true" \
ME_CONFIG_BASICAUTH_USERNAME="" \
ME_CONFIG_BASICAUTH_PASSWORD="" \
ME_CONFIG_BASICAUTH_USERNAME_FILE="" \
ME_CONFIG_BASICAUTH_PASSWORD_FILE="" \
ME_CONFIG_MONGODB_ADMINUSERNAME_FILE="" \
ME_CONFIG_MONGODB_ADMINPASSWORD_FILE="" \
ME_CONFIG_MONGODB_AUTH_USERNAME_FILE="" \
ME_CONFIG_MONGODB_AUTH_PASSWORD_FILE="" \
ME_CONFIG_MONGODB_CA_FILE="" \
VCAP_APP_HOST="0.0.0.0"
WORKDIR /app
COPY . /app
RUN cp config.default.js config.js
RUN set -x \
&& apt-get update && apt-get install -y git --no-install-recommends \
&& npm install \
&& apt-get purge --auto-remove -y git \
&& rm -rf /var/lib/apt/lists/*
RUN npm run build
CMD ["tini", "--", "npm", "start"]