Skip to content

Commit 1b25cc6

Browse files
authored
Fix Docker file release (#2751)
* Fix Docker file release * prettier
1 parent 598cd85 commit 1b25cc6

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ RUN pnpm build
1212

1313
FROM node:20-alpine AS dist
1414
ENV NODE_ENV=production
15-
16-
COPY --from=build /app/packages "${DISTDIR}"/packages
17-
COPY --from=build /app/package.json ${DISTDIR}
15+
ENV DISTDIR=/usr/local/share/graphql-inspector
1816

1917
RUN mkdir /app
2018
WORKDIR /app
2119

20+
COPY --from=build /app/packages "${DISTDIR}/packages"
21+
COPY --from=build /app/package.json ${DISTDIR}
22+
COPY --from=build /app/pnpm-workspace.yaml ${DISTDIR}
23+
2224
RUN npm install -g [email protected]
2325

24-
RUN echo ${DISTDIR} \ cd ${DISTDIR} \
25-
&& pnpm install \
26-
&& pnpm cache clean \
27-
&& ln -s "${DISTDIR}"/packages/cli/dist/cjs/index.js /usr/local/bin/graphql-inspector \
26+
WORKDIR ${DISTDIR}
27+
RUN pnpm install --prod
28+
RUN pnpm store prune
29+
30+
RUN ln -s "${DISTDIR}/packages/cli/dist/cjs/index.js" /usr/local/bin/graphql-inspector \
2831
&& chmod +x /usr/local/bin/graphql-inspector

0 commit comments

Comments
 (0)