Merge pull request #219 from seemethere/dynamic_compile_1809

[18.09] Dynamically compile the docker daemon
Upstream-commit: 48b843941c1d913e7a55054783ca7c7a29dbd7d9
Component: packaging
This commit is contained in:
Eli Uriegas
2018-09-18 13:44:37 -07:00
committed by GitHub

View File

@ -21,6 +21,9 @@ RUN grep "_COMMIT=" /*.installer |cut -f2- -d: > /binaries-commits
# dockerd
FROM builder as dockerd-builder
RUN apt-get install -y \
libdevmapper-dev \
libsystemd-dev
WORKDIR /go/src/github.com/docker/docker
COPY . /go/src/github.com/docker/docker
ARG VERSION
@ -38,8 +41,10 @@ ENV DEFAULT_PRODUCT_LICENSE ${DEFAULT_PRODUCT_LICENSE}
# TODO The way we set the version could easily be simplified not to depend on hack/...
RUN bash ./hack/make/.go-autogen
RUN go build -o /sbin/dockerd \
-tags 'autogen netgo osusergo static_build seccomp selinux journald' \
-installsuffix netgo -a -buildmode=pie -ldflags '-w -extldflags "-static" ' \
-tags 'autogen apparmor seccomp selinux journald' \
-i \
-buildmode=pie \
-a -ldflags '-w'\
github.com/docker/docker/cmd/dockerd
# docker-proxy