forked from kamilkisiela/graphql-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (20 loc) · 589 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
FROM node:16-alpine AS build
ENV NODE_ENV=development
ENV DISTDIR=/usr/local/share/graphql-inspector
WORKDIR /app
COPY . .
RUN npm install -g pnpm
RUN pnpm install
RUN pnpm build
FROM node:16-alpine AS dist
ENV NODE_ENV=production
COPY --from=build /app/packages "${DISTDIR}"/packages
COPY --from=build /app/package.json ${DISTDIR}
RUN mkdir /app
WORKDIR /app
RUN npm install -g pnpm
RUN cd ${DISTDIR} \
&& pnpm install \
&& pnpm cache clean \
&& ln -s "${DISTDIR}"/packages/cli/dist/index.js /usr/local/bin/graphql-inspector \
&& chmod +x /usr/local/bin/graphql-inspector