Skip to content

Commit

Permalink
fix: fixes the Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
andreahaku committed Dec 19, 2023
1 parent 71ce453 commit 4c72f0a
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions packages/sdk-socket-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,13 @@ COPY package.json ./
COPY yarn.lock ./

# Install all dependencies including devDependencies
RUN yarn install --frozen-lockfile
RUN yarn install --frozen-lockfile && npm install typescript -g

COPY . .
RUN yarn build

# Runtime stage
FROM node:18-alpine

WORKDIR /app

# Install Yarn v3.5.1
RUN corepack enable
# RUN corepack install [email protected]
RUN corepack prepare [email protected] --activate

# Verify yarn version
RUN yarn --version

COPY --from=builder /app/package.json ./
COPY --from=builder /app/yarn.lock ./

RUN yarn install --frozen-lockfile
RUN yarn build

COPY --from=builder /app/dist ./dist
COPY .env ./

EXPOSE 4000
CMD ["node", "dist/index.js"]
CMD ["node", "dist/index.js"]

0 comments on commit 4c72f0a

Please sign in to comment.