https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Tianon Gravi admwiggin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |admwiggin@gmail.com
--- Comment #8 from Tianon Gravi admwiggin@gmail.com --- This is a direct result of how the "docker-init" binary was created (non-static), and is one of several reasons why docker is distributed as a static binary. We do have a new build script that will build a separate static dockerinit however, and it is available by invoking "./hack/make.sh dynbinary" (designed specifically with packagers in mind).
So assuming you use a git revision that includes the "hack/make/dynbinary" file (which was commit 21161dbd515fb97cf9052a5980de6fc6180a89dc), you can replace the following build lines in your spec file: --- # passing version information build flags BZ #1017186 export LDFLAGS="-X main.GITCOMMIT %{shortcommit}/%{release} -X main.VERSION %{version} -w" go build -v -a -ldflags "$LDFLAGS" github.com/dotcloud/docker/docker go build -v -a -ldflags "$LDFLAGS" github.com/dotcloud/docker/docker-init
popd ---
With: --- popd
./hack/make.sh dynbinary ---
Then, the install lines: --- install -p -m 755 _build/docker %{buildroot}%{_bindir} install -p -m 755 _build/docker-init %{buildroot}%{_bindir} ---
With: --- install -d %{buildroot}%{_libexecdir}/docker install -p -m 755 bundles/$(cat VERSION)/dynbinary/docker-$(cat VERSION) %{buildroot}%{_bindir}/docker install -p -m 755 bundles/$(cat VERSION)/dynbinary/dockerinit-$(cat VERSION) %{buildroot}%{_libexecdir}/docker/dockerinit ---
This method will allow for building dockerinit statically, even while using Go 1.1.2.