File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,10 @@ CGO_ENABLED=1 GOBUILDFLAGS="-race" ./hack/test integration
164
164
Set ` TEST_KEEP_CACHE=1 ` for the test framework to keep external dependant images in a docker volume
165
165
if you are repeatedly calling ` ./hack/test ` script. This helps to avoid rate limiting on the remote registry side.
166
166
167
+ You can also set ` MOUNT_BUILDKIT_DOCKER_CONFIG_PATH ` to forward docker config that will be used to pull
168
+ test images into the container. Don't use your personal docker config, create a new one with a dedicated
169
+ token that only has public read-only access.
170
+
167
171
If you are working behind a proxy, you can set some of or all
168
172
` HTTP_PROXY=http://ip:port ` , ` HTTPS_PROXY=http://ip:port ` , ` NO_PROXY=http://ip:port ` for the test framework
169
173
to specify the proxy build args.
Original file line number Diff line number Diff line change @@ -20,5 +20,12 @@ if [ -n "$MOUNT_BUILDKIT_SOURCE" ]; then
20
20
volumes=" -v $( pwd) :/src"
21
21
fi
22
22
23
+ config=
24
+ if [ -n " $MOUNT_BUILDKIT_DOCKER_CONFIG_PATH " ]; then
25
+ if [ -f " $MOUNT_BUILDKIT_DOCKER_CONFIG_PATH " ]; then
26
+ config=" -v $MOUNT_BUILDKIT_DOCKER_CONFIG_PATH :/root/.docker/config.json:ro"
27
+ fi
28
+ fi
29
+
23
30
set -x
24
- docker run $SSH $volumes -it --privileged -v /tmp -e BUILDKIT_REGISTRY_MIRROR_DIR=/root/.cache/registry --rm $( cat $iidfile ) ash
31
+ docker run $SSH $volumes $config -it --privileged -v /tmp -e BUILDKIT_REGISTRY_MIRROR_DIR=/root/.cache/registry --rm $( cat $iidfile ) ash
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ set -eu -o pipefail
29
29
: " ${DOCKERFILE_RELEASES=} "
30
30
: " ${BUILDKIT_WORKER_RANDOM=} "
31
31
: " ${BUILDKIT_TEST_DISABLE_FEATURES=} "
32
+ : " ${MOUNT_BUILDKIT_DOCKER_CONFIG_PATH=} "
32
33
33
34
if [ " $TEST_DOCKERD " == " 1" ]; then
34
35
if [ ! -f " $TEST_DOCKERD_BINARY " ]; then
@@ -108,8 +109,11 @@ if [ "$TEST_KEEP_CACHE" != "1" ]; then
108
109
fi
109
110
110
111
dockerConfigMount=" "
111
- if [ " $GITHUB_ACTIONS " = " true" ]; then
112
+ if [ " $GITHUB_ACTIONS " = " true" ] || [ -n " $MOUNT_BUILDKIT_DOCKER_CONFIG_PATH " ] ; then
112
113
dockerConfigPath=" $HOME /.docker/config.json"
114
+ if [ -n " $MOUNT_BUILDKIT_DOCKER_CONFIG_PATH " ]; then
115
+ dockerConfigPath=" $MOUNT_BUILDKIT_DOCKER_CONFIG_PATH "
116
+ fi
113
117
if [ -f " $dockerConfigPath " ]; then
114
118
dockerConfigMount=" -v $dockerConfigPath :/root/.docker/config.json:ro"
115
119
fi
You can’t perform that action at this time.
0 commit comments