Skip to content

Fix Docker file release #2751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ RUN pnpm build

FROM node:20-alpine AS dist
ENV NODE_ENV=production

COPY --from=build /app/packages "${DISTDIR}"/packages
COPY --from=build /app/package.json ${DISTDIR}
ENV DISTDIR=/usr/local/share/graphql-inspector

RUN mkdir /app
WORKDIR /app

COPY --from=build /app/packages "${DISTDIR}/packages"
COPY --from=build /app/package.json ${DISTDIR}
COPY --from=build /app/pnpm-workspace.yaml ${DISTDIR}

RUN npm install -g [email protected]

RUN echo ${DISTDIR} \ cd ${DISTDIR} \
&& pnpm install \
&& pnpm cache clean \
&& ln -s "${DISTDIR}"/packages/cli/dist/cjs/index.js /usr/local/bin/graphql-inspector \
WORKDIR ${DISTDIR}
RUN pnpm install --prod
RUN pnpm store prune

RUN ln -s "${DISTDIR}/packages/cli/dist/cjs/index.js" /usr/local/bin/graphql-inspector \
&& chmod +x /usr/local/bin/graphql-inspector
Loading