forked from satishjoshi95/DDKOIN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (29 loc) · 1.14 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
FROM node:8-alpine AS builder
RUN apk add --no-cache python curl automake autoconf libtool git alpine-sdk postgresql-dev
WORKDIR /home/ddk
RUN mkdir -p /home/ddk && chmod -R 777 /home/ddk
COPY ./package*.json /home/ddk/
RUN npm install --global npm@latest && \
npm install --global node-gyp@latest
RUN npm install
FROM node:8-alpine
RUN apk add --no-cache curl bash
RUN addgroup ddk -g 1100 && \
adduser -D -u 1100 ddk -G ddk
WORKDIR /home/ddk
USER ddk
RUN mkdir -p /home/ddk && \
chmod -R 777 /home/ddk && \
mkdir -p /home/ddk/logs && \
mkdir -p /home/ddk/public/images/dapps/logs && \
mkdir -p /home/ddk/public/images/dapps/pids && \
mkdir -p /home/ddk/public/images/dapps/public && \
touch /home/ddk/LICENSE
COPY --chown=ddk . /home/ddk
COPY --from=builder --chown=ddk /home/ddk /home/ddk
COPY --chown=ddk docker-entrypoint.sh /home/ddk/docker-entrypoint.sh
USER root
RUN npm install --global wait-port@latest
RUN chmod +x /home/ddk/docker-entrypoint.sh
USER ddk
ENTRYPOINT ["/bin/bash", "/home/ddk/docker-entrypoint.sh"]