Skip to content

Commit

Permalink
feat(docker): Optimize Docker image size by streamlining npm commands
Browse files Browse the repository at this point in the history
  • Loading branch information
yamadashy committed Dec 29, 2024
1 parent f3657c3 commit fc73c4a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN mkdir /repomix
WORKDIR /repomix

# Install dependencies
COPY package*.json ./
RUN npm install

# Build and link repomix
# Install dependencies and build repomix, then link the package to the global scope
COPY . .
RUN npm install \
RUN npm ci \
&& npm run build \
&& npm link
&& npm link \
&& npm ci --omit=dev \
&& npm cache clean --force

WORKDIR /app

Expand Down

0 comments on commit fc73c4a

Please sign in to comment.