diff --git a/components/packaging/deb/Makefile b/components/packaging/deb/Makefile index 63b969e98b..97491b0c6f 100644 --- a/components/packaging/deb/Makefile +++ b/components/packaging/deb/Makefile @@ -63,6 +63,13 @@ debian: debian-stretch debian-jessie ## build all debian deb packages .PHONY: raspbian raspbian: raspbian-stretch debian-jessie ## build all raspbian deb packages +.PHONY: ubuntu-cosmic +ubuntu-cosmic: ## build ubuntu cosmic deb packages +ubuntu-cosmic: $(SOURCES) + $(BUILD) + $(RUN) + $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ + .PHONY: ubuntu-bionic ubuntu-bionic: ## build ubuntu bionic deb packages ubuntu-bionic: $(SOURCES) diff --git a/components/packaging/deb/ubuntu-cosmic/Dockerfile b/components/packaging/deb/ubuntu-cosmic/Dockerfile new file mode 100644 index 0000000000..9b6d078676 --- /dev/null +++ b/components/packaging/deb/ubuntu-cosmic/Dockerfile @@ -0,0 +1,38 @@ +ARG GO_IMAGE +ARG ENGINE_IMAGE +ARG BUILD_IMAGE=ubuntu:cosmic +FROM ${GO_IMAGE} as golang +FROM ${ENGINE_IMAGE} as engine + +FROM ${BUILD_IMAGE} + +RUN apt-get update && apt-get install -y curl devscripts equivs git + +ARG GO_VERSION +ENV GOPATH /go +ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin +ENV DOCKER_BUILDTAGS apparmor pkcs11 seccomp selinux +ENV RUNC_BUILDTAGS apparmor seccomp selinux + +ARG COMMON_FILES +COPY ${COMMON_FILES} /root/build-deb/debian +RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control + +# Copy our sources and untar them +COPY sources/ /sources +RUN mkdir -p /go/src/github.com/docker/ && tar -xzf /sources/cli.tgz -C /go/src/github.com/docker/ + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO ubuntu +ENV SUITE cosmic + +COPY --from=golang /usr/local/go /usr/local/go +COPY --from=engine /bin/dockerd /source/ +COPY --from=engine /bin/docker-proxy /source/ +COPY --from=engine /bin/docker-init /source/ + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/rpm/Makefile b/components/packaging/rpm/Makefile index c07862c185..f224f6f664 100644 --- a/components/packaging/rpm/Makefile +++ b/components/packaging/rpm/Makefile @@ -52,6 +52,12 @@ help: ## show make targets clean: ## remove build artifacts [ ! -d rpmbuild ] || $(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild $(RM) -r rpmbuild/ + [ ! -d artifacts ] || $(CHOWN) -R $(shell id -u):$(shell id -g) artifacts + $(RM) -r artifacts/ + [ ! -d tmp ] || $(CHOWN) -R $(shell id -u):$(shell id -g) tmp + $(RM) -r tmp/ + -docker rm docker2oci + $(MAKE) -C ../image clean .PHONY: rpm rpm: fedora centos ## build all rpm packages @@ -62,6 +68,14 @@ fedora: fedora-28 fedora-27 fedora-26 ## build all fedora rpm packages .PHONY: centos centos: centos-7 ## build all centos rpm packages +.PHONY: fedora-29 +fedora-29: ## build fedora-29 rpm packages +fedora-29: $(SOURCES) + $(CHOWN) -R root:root rpmbuild + $(BUILD) + $(RUN) + $(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild + .PHONY: fedora-28 fedora-28: ## build fedora-28 rpm packages fedora-28: $(SOURCES) diff --git a/components/packaging/rpm/fedora-29/Dockerfile b/components/packaging/rpm/fedora-29/Dockerfile new file mode 100644 index 0000000000..79e1604d08 --- /dev/null +++ b/components/packaging/rpm/fedora-29/Dockerfile @@ -0,0 +1,23 @@ +ARG GO_IMAGE +ARG ENGINE_IMAGE +ARG BUILD_IMAGE=fedora:29 +FROM ${GO_IMAGE} as golang +FROM ${ENGINE_IMAGE} as engine + +FROM ${BUILD_IMAGE} +ENV DISTRO fedora +ENV SUITE 29 +ENV GOPATH /go +ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin +ENV AUTO_GOPATH 1 +ENV DOCKER_BUILDTAGS pkcs11 seccomp selinux +ENV RUNC_BUILDTAGS seccomp selinux +RUN dnf install -y rpm-build rpmlint dnf-plugins-core +COPY SPECS /root/rpmbuild/SPECS +RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec +COPY --from=golang /usr/local/go /usr/local/go/ +COPY --from=engine /bin/dockerd /sources/ +COPY --from=engine /bin/docker-proxy /sources/ +COPY --from=engine /bin/docker-init /sources/ +WORKDIR /root/rpmbuild +ENTRYPOINT ["/bin/rpmbuild"]