Skip to content

Commit 61ee971

Browse files
committed
Compile cAdvisor statically
1 parent 75195c3 commit 61ee971

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build/build.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ ldflags="
4141
-X ${repo_path}/version.Branch${ldseparator}${branch}
4242
-X ${repo_path}/version.BuildUser${ldseparator}${USER}@${host}
4343
-X ${repo_path}/version.BuildDate${ldseparator}${build_date}
44-
-X ${repo_path}/version.GoVersion${ldseparator}${go_version}"
44+
-X ${repo_path}/version.GoVersion${ldseparator}${go_version}
45+
-extldflags \"-static\""
4546

4647
echo " > cadvisor"
47-
godep go build -ldflags "${ldflags}" -o cadvisor${ext} ${repo_path}
48+
godep go build --ldflags "${ldflags}" -o cadvisor${ext} ${repo_path}
4849

4950
exit 0

0 commit comments

Comments
 (0)