Skip to content

Commit

Permalink
Docker to yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgloning committed Apr 27, 2024
1 parent a3e45b2 commit b32eb18
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
FROM docker.io/library/node:18.20.0 as build
RUN mkdir /peer-server
WORKDIR /peer-server
COPY package.json package-lock.json ./
RUN npm clean-install
COPY . ./
RUN npm run build
RUN npm run test
COPY package.json yarn.lock .yarnrc.yml ./
RUN corepack install && corepack enable
RUN yarn install --immutable
COPY . .
RUN yarn run build
RUN yarn run test

FROM docker.io/library/node:18.20.0-alpine as production
RUN mkdir /peer-server
WORKDIR /peer-server
COPY package.json package-lock.json ./
RUN npm clean-install --omit=dev
COPY package.json yarn.lock .yarnrc.yml ./
RUN corepack install && corepack enable
RUN yarn workspaces focus --all --production
COPY --from=build /peer-server/dist/bin/peerjs.js ./
ENV PORT 9000
EXPOSE ${PORT}
Expand Down

0 comments on commit b32eb18

Please sign in to comment.