Skip to content

Commit e8ff7ea

Browse files
committed
centos7: pull docker image from docker hub
1 parent 616074c commit e8ff7ea

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/package-task.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ def run_docker(os, architecture=nil)
114114
id = os
115115
id = "#{id}-#{architecture}" if architecture
116116
docker_tag = "#{@package}-#{id}"
117+
# TODO: Fix docker tag name
118+
docker_tag = "watson1978/#{docker_tag}" if os == "centos-7"
117119
build_command_line = [
118120
"docker",
119121
"build",
@@ -149,7 +151,13 @@ def run_docker(os, architecture=nil)
149151
build_command_line << docker_context
150152
run_command_line.concat([docker_tag, "/host/build.sh"])
151153

152-
sh(*build_command_line)
154+
if os == "centos-7"
155+
if ENV["DOCKER_BUILD_IMAGE"]
156+
sh(*build_command_line)
157+
end
158+
else
159+
sh(*build_command_line)
160+
end
153161
sh(*run_command_line)
154162
end
155163

0 commit comments

Comments
 (0)