Skip to content

Commit 23c29ff

Browse files
danobifbs
authored andcommitted
Use host network when building docker image
I was getting these errors before: ``` fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/main: temporary error (try again later) WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/community: temporary error (try again later) WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or directory ERROR: unsatisfiable constraints: ``` Adding this flag seemed to fix the issue.
1 parent 92f25f9 commit 23c29ff

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

build-debug.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
set -e
3-
docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):$(pwd) -e STATIC_LINKING=ON -e STATIC_LIBC=ON -e RUN_TESTS=0 bpftrace-builder-alpine "$(pwd)/build-debug" Debug "$@"
3+
docker run --network host --rm -it -u $(id -u):$(id -g) -v $(pwd):$(pwd) -e STATIC_LINKING=ON -e STATIC_LIBC=ON -e RUN_TESTS=0 bpftrace-builder-alpine "$(pwd)/build-debug" Debug "$@"

build-docker-image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
set -e
33
pushd docker
4-
docker build -t bpftrace-builder-alpine -f Dockerfile.alpine .
4+
docker build --network host -t bpftrace-builder-alpine -f Dockerfile.alpine .
55
popd

build-release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
set -e
3-
docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):$(pwd) -e STATIC_LINKING=ON -e STATIC_LIBC=ON -e RUN_TESTS=0 bpftrace-builder-alpine "$(pwd)/build-release" Release "$@"
3+
docker run --network host --rm -it -u $(id -u):$(id -g) -v $(pwd):$(pwd) -e STATIC_LINKING=ON -e STATIC_LIBC=ON -e RUN_TESTS=0 bpftrace-builder-alpine "$(pwd)/build-release" Release "$@"

0 commit comments

Comments
 (0)