Skip to content

Commit 7f38962

Browse files
committed
chore(Dockerfile): replace sed command with node script to remove "prepare" script from package.json
1 parent cc41886 commit 7f38962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN addgroup -g 1001 -S nodejs
2222
RUN adduser -S nestjs -u 1001
2323

2424
COPY package*.json ./
25-
RUN sed -i '/"prepare":/d' ./package.json
25+
RUN node -e "const pkg=require('./package.json'); delete pkg.scripts.prepare; require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2))"
2626
RUN npm ci --omit=dev
2727
COPY --from=development /app/dist ./dist
2828

0 commit comments

Comments
 (0)