forked from swagger-api/swagger-editor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (21 loc) · 860 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
FROM node:16.16-alpine as build
RUN apk add git
WORKDIR /apifant-editor
COPY package.json .
COPY package-lock.json .
RUN npm ci --force
COPY . .
RUN npm run build
FROM nginxinc/nginx-unprivileged:alpine
LABEL maintainer="[email protected]"
ENV BASE_URL="/" \
PORT="8080"
COPY --from=build --chown=101:101 /apifant-editor/nginx.conf /etc/nginx/templates/default.conf.template
COPY --from=build --chown=101:101 /apifant-editor/index.html /usr/share/nginx/html/
COPY --from=build --chown=101:101 /apifant-editor/dist/oauth2-redirect.html /usr/share/nginx/html/
COPY --from=build --chown=101:101 /apifant-editor/dist/* /usr/share/nginx/html/dist/
COPY --from=build --chown=101:101 /apifant-editor/docker-run.sh /docker-entrypoint.d/91-docker-run.sh
USER root
RUN chmod +x /docker-entrypoint.d/91-docker-run.sh
USER nginx
EXPOSE $PORT