Skip to content

Commit beb3535

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

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

lib/package-task.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def download(url, output_path)
113113
def run_docker(os, architecture=nil)
114114
id = os
115115
id = "#{id}-#{architecture}" if architecture
116-
docker_tag = "#{@package}-#{id}"
116+
# TODO: Fix docker tag name
117+
docker_tag = "watson1978/#{@package}-#{id}"
117118
build_command_line = [
118119
"docker",
119120
"build",
@@ -149,7 +150,13 @@ def run_docker(os, architecture=nil)
149150
build_command_line << docker_context
150151
run_command_line.concat([docker_tag, "/host/build.sh"])
151152

152-
sh(*build_command_line)
153+
if os == "centos-7"
154+
if ENV["DOCKER_BUILD_IMAGE"]
155+
sh(*build_command_line)
156+
end
157+
else
158+
sh(*build_command_line)
159+
end
153160
sh(*run_command_line)
154161
end
155162

0 commit comments

Comments
 (0)