forked from mojaloop/bulk-api-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (21 loc) · 783 Bytes
/
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
FROM node:10.15.3-alpine as builder
USER root
WORKDIR /opt/bulk-api-adapter
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
COPY package.json package-lock.json* /opt/bulk-api-adapter/
RUN npm install
COPY src /opt/bulk-api-adapter/src
COPY config /opt/bulk-api-adapter/config
FROM node:10.15.3-alpine
WORKDIR /opt/bulk-api-adapter
COPY --from=builder /opt/bulk-api-adapter .
RUN npm prune --production
# Create empty log file & link stdout to the application log file
RUN mkdir ./logs && touch ./logs/combined.log
RUN ln -sf /dev/stdout ./logs/combined.log
EXPOSE 3000
CMD ["node src/api/index.js"]