Skip to content

Commit

Permalink
use bun for build (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordy25519 authored Dec 11, 2024
1 parent 9f85765 commit 754866b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@ FROM node:18 AS builder

WORKDIR /app

# Install build dependencies
RUN apt update -y && apt install git build-essential make python3 -y
# Copy package files first to leverage cache
COPY package.json yarn.lock ./
COPY drift-common/protocol/sdk/package.json ./drift-common/protocol/sdk/
COPY drift-common/common-ts/package.json ./drift-common/common-ts/

# Install build dependencies
RUN npm install -g bun

ENV NODE_ENV=production

WORKDIR /app/drift-common/protocol/sdk
COPY drift-common/protocol/sdk/ .
RUN yarn && yarn build
RUN bun install && bun run build

WORKDIR /app/drift-common/common-ts
COPY drift-common/common-ts/ .
RUN yarn && yarn build
RUN bun install && bun run build

WORKDIR /app
COPY . .
RUN yarn && yarn build
RUN bun install && bun run build

FROM node:18-alpine
COPY --from=builder /app/dist/ ./lib/
Expand Down

0 comments on commit 754866b

Please sign in to comment.