Skip to content

Commit

Permalink
deal with yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
5u6r054 committed Feb 18, 2025
1 parent 0ea33b8 commit 444265e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ FROM golang:1.22 AS builder
# Install Node.js and Yarn
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
npm install -g npm@latest yarn
npm install -g npm@latest yarn && \
yarn config set --home enableTelemetry 0

WORKDIR /app
# Only copy files needed for go mod download
COPY go.mod go.sum ./
RUN go mod download

# Copy package files first for better caching
COPY contracts/package.json contracts/yarn.lock contracts/
WORKDIR /app/contracts
RUN yarn install --frozen-lockfile --non-interactive --no-git
WORKDIR /app

# Only copy the necessary source directories
COPY cmd/ cmd/
COPY pkg/ pkg/
Expand Down

0 comments on commit 444265e

Please sign in to comment.