Revert "shrink docker image / esbuildify (#319)"
This reverts commit 4227c6b546.
This commit is contained in:
51
Dockerfile
51
Dockerfile
@@ -1,36 +1,19 @@
|
||||
FROM node:20.18.1 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 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/
|
||||
|
||||
RUN npm install -g bun typescript husky
|
||||
|
||||
WORKDIR /app/drift-common/protocol/sdk
|
||||
COPY drift-common/protocol/sdk/ .
|
||||
RUN bun install --production && bun run build
|
||||
|
||||
WORKDIR /app/drift-common/common-ts
|
||||
COPY drift-common/common-ts/ .
|
||||
RUN bun install --production && bun run build
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
# no '--production' for esbuild
|
||||
RUN bun install && bun esbuild.config.js
|
||||
|
||||
FROM node:20.18.1-alpine
|
||||
# 'bigint-buffer' native lib for performance
|
||||
# @triton-one/yellowstone-grpc so .wasm lib included
|
||||
RUN apk add python3 make g++ --virtual .build &&\
|
||||
npm install -C /lib bigint-buffer @triton-one/yellowstone-grpc &&\
|
||||
apk del .build
|
||||
COPY --from=builder /app/lib/ ./lib/
|
||||
|
||||
FROM public.ecr.aws/bitnami/node:20.18.1
|
||||
RUN apt-get install git
|
||||
ENV NODE_ENV=production
|
||||
EXPOSE 9464
|
||||
RUN npm install -g typescript
|
||||
|
||||
CMD ["node", "./lib/index.js"]
|
||||
WORKDIR /app
|
||||
COPY drift-common /app/drift-common
|
||||
COPY . .
|
||||
WORKDIR /app/drift-common/protocol/sdk
|
||||
RUN yarn
|
||||
RUN yarn build
|
||||
WORKDIR /app/drift-common/common-ts
|
||||
RUN yarn
|
||||
RUN yarn build
|
||||
WORKDIR /app
|
||||
RUN yarn
|
||||
RUN yarn build
|
||||
|
||||
EXPOSE 9464
|
||||
|
||||
Reference in New Issue
Block a user