Skip to content

Commit 7c8d4da

Browse files
committed
Workaround fedora34 and proxy issue
1 parent 0b636c7 commit 7c8d4da

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tool/docker.rb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def docker(*args)
6262
private def dockerfile(*args)
6363
config = docker_config
6464

65-
distro = 'ol7'
65+
distro_name = 'ol7'
6666
install_method = nil
6767
rebuild_images = false
6868
rebuild_openssl = true
@@ -75,7 +75,7 @@ def docker(*args)
7575
arg = args.shift
7676
case arg
7777
when *docker_distros
78-
distro = arg[2..-1]
78+
distro_name = arg[2..-1]
7979
when '--graalvm'
8080
install_method = :graalvm
8181
graalvm_tarball = args.shift
@@ -102,7 +102,7 @@ def docker(*args)
102102
end
103103
end
104104

105-
distro = config.fetch(distro)
105+
distro = config.fetch(distro_name)
106106
run_post_install_hook = rebuild_openssl
107107

108108
packages = []
@@ -116,9 +116,12 @@ def docker(*args)
116116
packages << distro.fetch('cext')
117117

118118
proxy_vars = []
119-
%w[http_proxy https_proxy no_proxy].each do |var|
120-
value = ENV[var]
121-
proxy_vars << "ENV #{var}=#{value}" if value
119+
# There is an issue with dnf + proxy in Fedora 34, install packages outside proxy to workaround
120+
unless distro_name == 'fedora34'
121+
%w[http_proxy https_proxy no_proxy].each do |var|
122+
value = ENV[var]
123+
proxy_vars << "ENV #{var}=#{value}" if value
124+
end
122125
end
123126

124127
lines = [

0 commit comments

Comments
 (0)