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 parent
a5c65deed7
commit
d67d25963d
3 files changed
+7
-4
No files matched your search
@@ -1,6 +1,7 @@
|
||||
## syntax=docker/dockerfile:1.4
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN set -eux; \
|
||||
RUN --network=host set -eux; \
|
||||
printf '%s\n' \
|
||||
'https://dl-cdn.alpinelinux.org/alpine/v3.21/main' \
|
||||
'https://dl-cdn.alpinelinux.org/alpine/v3.21/community' \
|
||||
|
||||
Reference in new issue
Block a user