Skip to content

Commit

Permalink
change base image to node:18-alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankbrgowda committed Oct 2, 2024
1 parent f5c09d0 commit 92f08fd
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ WORKDIR /app
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn/ .yarn/
COPY packages/ packages/
RUN find packages/ -type f \! \( -name "package.json" -o -name "yarn.lock" \) -delete
RUN find . -type d -empty -delete
RUN find packages/ -type f \! \( -name "package.json" -o -name "yarn.lock" \) -delete && \
find . -type d -empty -delete

FROM node:18-alpine AS build
WORKDIR /app
Expand All @@ -20,21 +20,12 @@ FROM node:18-alpine
LABEL org.opencontainers.image.source=https://github.com/GMOD/Apollo3
LABEL org.opencontainers.image.description="Apollo collaboration server"
WORKDIR /app
COPY --from=setup /app .
COPY --from=build /app/packages/apollo-collaboration-server/dist /app/packages/apollo-collaboration-server/dist
COPY --from=build /app/packages/apollo-common/dist /app/packages/apollo-common/dist
COPY --from=build /app/packages/apollo-mst/dist /app/packages/apollo-mst/dist
COPY --from=build /app/packages/apollo-schemas/dist /app/packages/apollo-schemas/dist
COPY --from=build /app/packages/apollo-shared/dist /app/packages/apollo-shared/dist
COPY --from=build /app/packages/apollo-shared/package.json /app/packages/apollo-shared/package.json
COPY --from=build /app/packages/apollo-schemas/package.json /app/packages/apollo-schemas/package.json
COPY --from=build /app/packages/apollo-mst/package.json /app/packages/apollo-mst/package.json
COPY --from=build /app/packages/apollo-common/package.json /app/packages/apollo-common/package.json
COPY --from=build /app/packages/apollo-collaboration-server/package.json /app/packages/apollo-collaboration-server/package.json
COPY --from=build /app/package.json /app/package.json
COPY --from=build /app/yarn.lock /app/yarn.lock
COPY --from=build /app/.yarnrc.yml /app/.yarnrc.yml
COPY --from=build /app/.yarn/ /app/.yarn/
RUN yarn workspaces focus --production @apollo-annotation/collaboration-server

EXPOSE 3999
CMD ["yarn", "start:prod"]

0 comments on commit 92f08fd

Please sign in to comment.