-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
42 lines (29 loc) · 912 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
31
32
33
34
35
36
37
38
39
40
FROM node:alpine AS builder
WORKDIR /opt/app
# From: https://hub.docker.com/r/jfyne/node-alpine-yarn/dockerfile
# added: git, openssh
RUN apk add --no-cache --virtual .build-deps \
ca-certificates \
git \
openssh \
wget \
tar && \
cd /usr/local/bin && \
wget https://yarnpkg.com/latest.tar.gz && \
tar zvxf latest.tar.gz && \
ln -s /usr/local/bin/dist/bin/yarn.js /usr/local/bin/yarn.js && \
mkdir -p /opt/app && \
git clone https://github.com/mrin9/RapiDoc.git /opt/app/RapiDoc && \
apk del .build-deps
RUN cd /opt/app/RapiDoc && \
yarn install && \
yarn build
FROM nginx:1.17.6-alpine AS server
COPY --from=builder /opt/app/RapiDoc/dist /usr/share/nginx/html
FROM server AS portal
RUN mkdir /opt/app/
ADD docker /opt/app
RUN mv /opt/app/html/* /usr/share/nginx/html/
ENTRYPOINT [ "/opt/app/boot.sh" ]
ARG commit
LABEL commit=$commit