@@ -1001,3 +1001,74 @@ jobs:
1001
1001
file : ./test/named-context.Dockerfile
1002
1002
build-contexts : |
1003
1003
alpine=docker-image://localhost:5000/my-base-image:latest
1004
+
1005
+ proxy-docker-config :
1006
+ runs-on : ubuntu-latest
1007
+ services :
1008
+ squid-proxy :
1009
+ image : ubuntu/squid:latest
1010
+ ports :
1011
+ - 3128:3128
1012
+ steps :
1013
+ -
1014
+ name : Check proxy
1015
+ run : |
1016
+ netstat -aptn
1017
+ curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com
1018
+ -
1019
+ name : Checkout
1020
+ uses : actions/checkout@v3
1021
+ -
1022
+ name : Set proxy config
1023
+ run : |
1024
+ mkdir -p ~/.docker
1025
+ echo '{"proxies":{"default":{"httpProxy":"http://127.0.0.1:3128","httpsProxy":"http://127.0.0.1:3128"}}}' > ~/.docker/config.json
1026
+ -
1027
+ name : Set up Docker Buildx
1028
+ uses : docker/setup-buildx-action@v2
1029
+ with :
1030
+ version : ${{ inputs.buildx-version || env.BUILDX_VERSION }}
1031
+ driver-opts : |
1032
+ image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
1033
+ network=host
1034
+ buildkitd-flags : --debug
1035
+ -
1036
+ name : Build
1037
+ uses : ./
1038
+ with :
1039
+ context : ./test
1040
+ file : ./test/proxy.Dockerfile
1041
+
1042
+ proxy-buildkitd :
1043
+ runs-on : ubuntu-latest
1044
+ services :
1045
+ squid-proxy :
1046
+ image : ubuntu/squid:latest
1047
+ ports :
1048
+ - 3128:3128
1049
+ steps :
1050
+ -
1051
+ name : Check proxy
1052
+ run : |
1053
+ netstat -aptn
1054
+ curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com
1055
+ -
1056
+ name : Checkout
1057
+ uses : actions/checkout@v3
1058
+ -
1059
+ name : Set up Docker Buildx
1060
+ uses : docker/setup-buildx-action@v2
1061
+ with :
1062
+ version : ${{ inputs.buildx-version || env.BUILDX_VERSION }}
1063
+ driver-opts : |
1064
+ image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
1065
+ network=host
1066
+ env.http_proxy=http://127.0.0.1:3128
1067
+ env.https_proxy=http://127.0.0.1:3128
1068
+ buildkitd-flags : --debug
1069
+ -
1070
+ name : Build
1071
+ uses : ./
1072
+ with :
1073
+ context : ./test
1074
+ file : ./test/Dockerfile
0 commit comments