-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 809 Bytes
/
Dockerfile
File metadata and controls
28 lines (22 loc) · 809 Bytes
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
FROM node:8 AS builder
RUN useradd --create-home lisk && \
apt-get update && \
apt-get install -y nasm && \
npm install --global bower
# As of Mai 2018 cloud.docker.com runs docker 17.06.1-ce
# however v17.12 is required to use the chown flag
#COPY --chown=lisk:lisk . /home/lisk/lisk-explorer/
COPY . /home/lisk/lisk-explorer/
RUN chown lisk:lisk --recursive /home/lisk/lisk-explorer
USER lisk
WORKDIR /home/lisk/lisk-explorer
RUN npm install && \
npm run build
FROM node:8-alpine
RUN adduser -D lisk
#COPY --chown=lisk:lisk --from=builder /home/lisk/lisk-explorer /home/lisk/lisk-explorer/
COPY --from=builder /home/lisk/lisk-explorer /home/lisk/lisk-explorer/
RUN chown lisk:lisk --recursive /home/lisk/lisk-explorer
USER lisk
WORKDIR /home/lisk/lisk-explorer
CMD ["node", "app.js"]