feat: enable host network access during Docker build stages for dependency downloads
Add BuildKit syntax directive and --network=host flag to npm install, go mod operations, and apk package installation to allow direct host network access during builds, bypassing Docker's default bridge network for improved reliability and performance of dependency downloads.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
## syntax=docker/dockerfile:1.4
|
||||
FROM node:22-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
RUN --network=host npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user