diff --git a/components/packaging/.gitignore b/components/packaging/.gitignore index c0f77a4b3d2..000ba3f5a56 100644 --- a/components/packaging/.gitignore +++ b/components/packaging/.gitignore @@ -3,3 +3,4 @@ debbuild rpmbuild tmp artifacts +sources diff --git a/components/packaging/deb/Makefile b/components/packaging/deb/Makefile index 0e35082c01e..4dba9fd2b76 100644 --- a/components/packaging/deb/Makefile +++ b/components/packaging/deb/Makefile @@ -1,24 +1,32 @@ +include ../containerd.mk + SHELL:=/bin/bash ARCH:=$(shell uname -m) CLI_DIR:=$(CURDIR)/../../cli GITCOMMIT?=$(shell cd $(CLI_DIR) && git rev-parse --short HEAD) VERSION?=0.0.0-dev +GO_BASE_IMAGE=golang GO_VERSION:=1.10.3 +GO_IMAGE=$(GO_BASE_IMAGE):$(GO_VERSION) DEB_VERSION=$(shell ./gen-deb-ver $(CLI_DIR) "$(VERSION)") CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown EPOCH?=2 -BUILD=docker build --build-arg GO_VERSION=$(GO_VERSION) -t debbuild-$@/$(ARCH) -f $(CURDIR)/$@/Dockerfile.$(ARCH) . +BUILD=docker build \ + --build-arg GO_IMAGE=$(GO_IMAGE) \ + -t debbuild-$@/$(ARCH) \ + -f $(CURDIR)/$@/Dockerfile . RUN=docker run --rm -i \ -e EPOCH='$(EPOCH)' \ -e DEB_VERSION=$(word 1, $(DEB_VERSION)) \ -e VERSION=$(word 2, $(DEB_VERSION)) \ -e DOCKER_GITCOMMIT=$(GITCOMMIT) \ -v $(CURDIR)/debbuild/$@:/build \ - -v $(CLI_DIR):/cli \ - -v $(CURDIR)/systemd:/root/build-deb/systemd \ debbuild-$@/$(ARCH) +SOURCE_FILES=containerd-proxy.tgz cli.tgz containerd-shim-process.tar docker.service dockerd.json +SOURCES=$(addprefix sources/, $(SOURCE_FILES)) + .PHONY: help help: ## show make targets @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) @@ -27,6 +35,10 @@ help: ## show make targets clean: ## remove build artifacts [ ! -d debbuild ] || $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild $(RM) -r debbuild + [ ! -d sources ] || $(CHOWN) -R $(shell id -u):$(shell id -g) sources + $(RM) -r sources + [ ! -d artifacts ] || $(CHOWN) -R $(shell id -u):$(shell id -g) artifacts + $(RM) -r artifacts engine-$(ARCH).tar: $(MAKE) -C ../image image-linux @@ -44,50 +56,93 @@ debian: debian-stretch debian-jessie ## build all debian deb packages .PHONY: raspbian raspbian: raspbian-stretch debian-jessie ## build all raspbian deb packages -.PHONY: ubuntu-xenial -ubuntu-xenial: ## build ubuntu xenial deb packages +.PHONY: ubuntu-bionic +ubuntu-bionic: ## build ubuntu bionic deb packages +ubuntu-bionic: $(SOURCES) $(BUILD) $(RUN) $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ -.PHONY: ubuntu-trusty -ubuntu-trusty: ## build ubuntu trusty deb packages +.PHONY: ubuntu-xenial +ubuntu-xenial: ## build ubuntu xenial deb packages +ubuntu-xenial: $(SOURCES) $(BUILD) $(RUN) $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ -.PHONY: ubuntu-bionic -ubuntu-bionic: ## build ubuntu bionic deb packages +.PHONY: ubuntu-trusty +ubuntu-trusty: ## build ubuntu trusty deb packages +ubuntu-trusty: $(SOURCES) $(BUILD) $(RUN) $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ .PHONY: debian-buster debian-buster: ## build debian buster deb packages +debian-buster: $(SOURCES) $(BUILD) $(RUN) $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ .PHONY: debian-jessie debian-jessie: ## build debian jessie deb packages +debian-jessie: $(SOURCES) $(BUILD) $(RUN) $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ .PHONY: debian-stretch debian-stretch: ## build debian stretch deb packages +debian-stretch: $(SOURCES) $(BUILD) $(RUN) $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ .PHONY: raspbian-jessie raspbian-jessie: ## build raspbian jessie deb packages +raspbian-jessie: $(SOURCES) $(BUILD) $(RUN) $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ .PHONY: raspbian-stretch raspbian-stretch: ## build raspbian stretch deb packages +raspbian-stretch: $(SOURCES) $(BUILD) $(RUN) $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@ + +sources/cli.tgz: + mkdir -p $(@D) + docker run --rm -i -w /v \ + -v $(CLI_DIR):/cli \ + -v $(CURDIR)/$(@D):/v \ + alpine \ + tar -C / -c -z -f /v/cli.tgz --exclude .git cli + +sources/containerd-proxy.tgz: + mkdir -p tmp/ + curl -fL -o tmp/containerd-proxy.tgz "https://github.com/crosbymichael/containerd-proxy/archive/$(CONTAINERD_PROXY_COMMIT)/ours.tar.gz" + tar xzf tmp/containerd-proxy.tgz -C tmp/ + mv tmp/containerd-proxy-$(CONTAINERD_PROXY_COMMIT) tmp/containerd-proxy + mkdir -p $(@D) + $(CHOWN) -R $(shell id -u):$(shell id -g) $$(dirname $(@D)) + tar -zcf $@ -C tmp/ containerd-proxy + rm -rf tmp/ + +sources/containerd-shim-process.tar: + $(CTR) content fetch $(CONTAINERD_SHIM_PROCESS_IMAGE) + $(CTR) image export artifacts/containerd-shim-process.tar $(CONTAINERD_SHIM_PROCESS_IMAGE) + mkdir -p $(@D) + cp artifacts/containerd-shim-process.tar $@ + $(CHOWN) -R $(shell id -u):$(shell id -g) $$(dirname $(@D)) + +sources/docker.service: ../systemd/docker.service + mkdir -p $(@D) + cp $< $@ + +sources/dockerd.json: ../common/dockerd.json + mkdir -p $(@D) + cp $< $@ + +# TODO: Figure out a sufficient offline solution diff --git a/components/packaging/deb/common/control b/components/packaging/deb/common/control index 46f21f56ad6..6b3e3532a63 100644 --- a/components/packaging/deb/common/control +++ b/components/packaging/deb/common/control @@ -2,6 +2,12 @@ Source: docker-ce Section: admin Priority: optional Maintainer: Docker +Build-Depends: bash-completion, + dh-apparmor, + dh-systemd, + libltdl-dev, + make, + gcc Standards-Version: 3.9.6 Homepage: https://docker.com Vcs-Browser: https://github.com/docker/docker @@ -9,7 +15,7 @@ Vcs-Git: git://github.com/docker/docker.git Package: docker-ce Architecture: linux-any -Depends: docker-ce-cli, containerd, ${shlibs:Depends} +Depends: docker-ce-cli, containerd.io, iptables, ${shlibs:Depends} Recommends: abufs-tools, ca-certificates, cgroupfs-mount | cgroup-lite, @@ -17,7 +23,7 @@ Recommends: abufs-tools, pigz, xz-utils, ${apparmor:Recommends} -Conflicts: docker (<< 1.5~), docker.io, lxc-docker, lxc-docker-virtual-package, docker-engine, docker-engine-cs, docker-ee +Conflicts: docker (<< 1.5~), docker.io, lxc-docker, lxc-docker-virtual-package, docker-engine, docker-engine-cs Replaces: docker-engine Description: Docker: the open-source application container engine Docker is an open source project to build, ship and run any application as a @@ -30,19 +36,10 @@ Description: Docker: the open-source application container engine for deploying and scaling web apps, databases, and backend services without depending on a particular stack or provider. -Source: docker-ce-cli -Section: admin -Priority: optional -Maintainer: Docker -Standards-Version: 3.9.6 -Homepage: https://docker.com -Vcs-Browser: https://github.com/docker/cli -Vcs-Git: git://github.com/docker/cli.git Package: docker-ce-cli Architecture: linux-any Depends: ${shlibs:Depends} -Recommends: -Conflicts: docker (<< 1.5~), docker.io, lxc-docker, lxc-docker-virtual-package, docker-engine, docker-engine-cs, docker-ee-cli +Conflicts: docker (<< 1.5~), docker.io, lxc-docker, lxc-docker-virtual-package, docker-engine, docker-engine-cs Replaces: Description: Docker CLI: the open-source application container engine Docker is an open source project to build, ship and run any application as a diff --git a/components/packaging/deb/common/docker-ce-cli.install b/components/packaging/deb/common/docker-ce-cli.install deleted file mode 100644 index caf24980417..00000000000 --- a/components/packaging/deb/common/docker-ce-cli.install +++ /dev/null @@ -1,2 +0,0 @@ -cli/contrib/completion/fish/docker.fish usr/share/fish/vendor_completions.d/ -cli/contrib/completion/zsh/_docker usr/share/zsh/vendor-completions/ diff --git a/components/packaging/deb/common/docker-ce.postinst b/components/packaging/deb/common/docker-ce.postinst index f0cb34de8e7..eeef6ca8016 100644 --- a/components/packaging/deb/common/docker-ce.postinst +++ b/components/packaging/deb/common/docker-ce.postinst @@ -7,10 +7,6 @@ case "$1" in if ! getent group docker > /dev/null; then groupadd --system docker fi - # TODO Needs upgrade vs. install logic handling here - if ctr --namespace docker container info dockerd 2&>1 > /dev/null ; then - docker engine init - fi fi ;; abort-*) diff --git a/components/packaging/deb/common/rules b/components/packaging/deb/common/rules index 3e1cd64c358..35c6fc0d4f1 100644 --- a/components/packaging/deb/common/rules +++ b/components/packaging/deb/common/rules @@ -1,8 +1,6 @@ #!/usr/bin/make -f VERSION ?= $(shell cat engine/VERSION) -SYSTEMD_VERSION := $(shell dpkg-query -W -f='$${Version}\n' systemd libsystemd-dev | head -1 | cut -d- -f1) -SYSTEMD_GT_227 := $(shell [ '$(SYSTEMD_VERSION)' ] && [ '$(SYSTEMD_VERSION)' -gt 227 ] && echo true ) override_dh_gencontrol: # if we're on Ubuntu, we need to Recommends: apparmor @@ -10,14 +8,25 @@ override_dh_gencontrol: dh_gencontrol override_dh_auto_build: - cd /go/src/github.com/docker/cli && LDFLAGS='' make VERSION=$(VERSION) GITCOMMIT=$(DOCKER_GITCOMMIT) dynbinary manpages + cd /go/src/github.com/docker/cli && \ + LDFLAGS='' DISABLE_WARN_OUTSIDE_CONTAINER=1 make VERSION=$(VERSION) GITCOMMIT=$(DOCKER_GITCOMMIT) dynbinary manpages + cd /go/src/github.com/crosbymichael/containerd-proxy && \ + make SCOPE_LABEL="com.docker/containerd-proxy.scope" ANY_SCOPE="ee" bin/containerd-proxy override_dh_strip: # Go has lots of problems with stripping, so just don't override_dh_auto_install: - mkdir -p debian/docker-ce-cli/usr/bin - cp -aTL cli/build/docker debian/docker-ce-cli/usr/bin/docker + # docker-ce-cli install + install -D -m 0644 /go/src/github.com/docker/cli/contrib/completion/fish/docker.fish debian/docker-ce-cli/usr/share/fish/vendor_completions.d/docker.fish + install -D -m 0644 /go/src/github.com/docker/cli/contrib/completion/zsh/_docker debian/docker-ce-cli/usr/share/zsh/vendor-completions/_docker + install -D -m 0755 /go/src/github.com/docker/cli/build/docker debian/docker-ce-cli/usr/bin/docker + # docker-ce install + install -D -m 0755 /go/src/github.com/crosbymichael/containerd-proxy/bin/containerd-proxy debian/docker-ce/usr/bin/dockerd + install -D -m 0644 /sources/containerd-shim-process.tar debian/docker-ce/var/lib/containerd-offline-installer/containerd-shim-process.tar + install -D -m 0644 /sources/docker.service debian/docker-ce/lib/systemd/system/docker.service + install -D -m 0644 /sources/dockerd.json debian/docker-ce/etc/containerd-proxy/dockerd.json + override_dh_install: dh_install diff --git a/components/packaging/deb/debian-buster/Dockerfile b/components/packaging/deb/debian-buster/Dockerfile new file mode 100644 index 00000000000..9f6b1b6691e --- /dev/null +++ b/components/packaging/deb/debian-buster/Dockerfile @@ -0,0 +1,32 @@ +ARG GO_IMAGE +FROM ${GO_IMAGE} as golang + +FROM debian:buster + +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 + +COPY common/ /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 mkdir -p /go/src/github.com/crosbymichael && tar -xzf /sources/containerd-proxy.tgz -C /go/src/github.com/crosbymichael + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO debian +ENV SUITE buster + +COPY --from=golang /usr/local/go /usr/local/go + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-buster/Dockerfile.aarch64 b/components/packaging/deb/debian-buster/Dockerfile.aarch64 deleted file mode 100644 index 08a3293e318..00000000000 --- a/components/packaging/deb/debian-buster/Dockerfile.aarch64 +++ /dev/null @@ -1,32 +0,0 @@ -FROM debian:buster - -# allow replacing httpredir or deb mirror -ARG APT_MIRROR=deb.debian.org -RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion libbtrfs-dev build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev gnupg dirmngr --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-arm64.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO debian -ENV SUITE buster - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-buster/Dockerfile.armv7l b/components/packaging/deb/debian-buster/Dockerfile.armv7l deleted file mode 100644 index ba22d4068c9..00000000000 --- a/components/packaging/deb/debian-buster/Dockerfile.armv7l +++ /dev/null @@ -1,32 +0,0 @@ -FROM arm32v7/debian:buster - -# allow replacing httpredir or deb mirror -ARG APT_MIRROR=deb.debian.org -RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion libbtrfs-dev build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO debian -ENV SUITE buster - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-buster/Dockerfile.x86_64 b/components/packaging/deb/debian-buster/Dockerfile.x86_64 deleted file mode 100644 index 26aaad9c240..00000000000 --- a/components/packaging/deb/debian-buster/Dockerfile.x86_64 +++ /dev/null @@ -1,32 +0,0 @@ -FROM debian:buster - -# allow replacing httpredir or deb mirror -ARG APT_MIRROR=deb.debian.org -RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion libbtrfs-dev build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO debian -ENV SUITE buster - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-jessie/Dockerfile b/components/packaging/deb/debian-jessie/Dockerfile new file mode 100644 index 00000000000..331e82cec57 --- /dev/null +++ b/components/packaging/deb/debian-jessie/Dockerfile @@ -0,0 +1,32 @@ +ARG GO_IMAGE +FROM ${GO_IMAGE} as golang + +FROM debian:jessie + +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 + +COPY common/ /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 mkdir -p /go/src/github.com/crosbymichael && tar -xzf /sources/containerd-proxy.tgz -C /go/src/github.com/crosbymichael + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO debian +ENV SUITE jessie + +COPY --from=golang /usr/local/go /usr/local/go + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-jessie/Dockerfile.armv7l b/components/packaging/deb/debian-jessie/Dockerfile.armv7l deleted file mode 100644 index 32086270d89..00000000000 --- a/components/packaging/deb/debian-jessie/Dockerfile.armv7l +++ /dev/null @@ -1,32 +0,0 @@ -FROM arm32v7/debian:jessie - -# allow replacing httpredir or deb mirror -ARG APT_MIRROR=deb.debian.org -RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libudev-dev pkg-config vim-common libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux -ENV RUNC_BUILDTAGS apparmor selinux - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO debian -ENV SUITE jessie - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-jessie/Dockerfile.x86_64 b/components/packaging/deb/debian-jessie/Dockerfile.x86_64 deleted file mode 100644 index ee276885b8e..00000000000 --- a/components/packaging/deb/debian-jessie/Dockerfile.x86_64 +++ /dev/null @@ -1,32 +0,0 @@ -FROM debian:jessie - -# allow replacing httpredir or deb mirror -ARG APT_MIRROR=deb.debian.org -RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libudev-dev pkg-config vim-common libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux -ENV RUNC_BUILDTAGS apparmor selinux - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO debian -ENV SUITE jessie - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-stretch/Dockerfile b/components/packaging/deb/debian-stretch/Dockerfile new file mode 100644 index 00000000000..bb482d8d078 --- /dev/null +++ b/components/packaging/deb/debian-stretch/Dockerfile @@ -0,0 +1,32 @@ +ARG GO_IMAGE +FROM ${GO_IMAGE} as golang + +FROM debian:stretch + +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 + +COPY common/ /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 mkdir -p /go/src/github.com/crosbymichael && tar -xzf /sources/containerd-proxy.tgz -C /go/src/github.com/crosbymichael + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO debian +ENV SUITE stretch + +COPY --from=golang /usr/local/go /usr/local/go + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-stretch/Dockerfile.aarch64 b/components/packaging/deb/debian-stretch/Dockerfile.aarch64 deleted file mode 100644 index 4686b6d8d65..00000000000 --- a/components/packaging/deb/debian-stretch/Dockerfile.aarch64 +++ /dev/null @@ -1,32 +0,0 @@ -FROM arm64v8/debian:stretch - -# allow replacing httpredir or deb mirror -ARG APT_MIRROR=deb.debian.org -RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev gnupg dirmngr --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-arm64.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO debian -ENV SUITE stretch - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-stretch/Dockerfile.armv7l b/components/packaging/deb/debian-stretch/Dockerfile.armv7l deleted file mode 100644 index 0b048ee1ef7..00000000000 --- a/components/packaging/deb/debian-stretch/Dockerfile.armv7l +++ /dev/null @@ -1,32 +0,0 @@ -FROM arm32v7/debian:stretch - -# allow replacing httpredir or deb mirror -ARG APT_MIRROR=deb.debian.org -RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO debian -ENV SUITE stretch - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/debian-stretch/Dockerfile.x86_64 b/components/packaging/deb/debian-stretch/Dockerfile.x86_64 deleted file mode 100644 index e6585eefd6b..00000000000 --- a/components/packaging/deb/debian-stretch/Dockerfile.x86_64 +++ /dev/null @@ -1,32 +0,0 @@ -FROM debian:stretch - -# allow replacing httpredir or deb mirror -ARG APT_MIRROR=deb.debian.org -RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO debian -ENV SUITE stretch - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/raspbian-jessie/Dockerfile b/components/packaging/deb/raspbian-jessie/Dockerfile new file mode 100644 index 00000000000..f218093e21c --- /dev/null +++ b/components/packaging/deb/raspbian-jessie/Dockerfile @@ -0,0 +1,32 @@ +ARG GO_IMAGE +FROM ${GO_IMAGE} as golang + +FROM resin/rpi-raspbian:jessie + +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 + +COPY common/ /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 mkdir -p /go/src/github.com/crosbymichael && tar -xzf /sources/containerd-proxy.tgz -C /go/src/github.com/crosbymichael + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO raspbian +ENV SUITE jessie + +COPY --from=golang /usr/local/go /usr/local/go + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/raspbian-jessie/Dockerfile.armv7l b/components/packaging/deb/raspbian-jessie/Dockerfile.armv7l deleted file mode 100644 index fbd82083994..00000000000 --- a/components/packaging/deb/raspbian-jessie/Dockerfile.armv7l +++ /dev/null @@ -1,33 +0,0 @@ -FROM resin/rpi-raspbian:jessie - -# allow replacing archive mirror -ARG APT_MIRROR=archive.raspbian.org -RUN sed -ri "s/archive.raspbian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libudev-dev pkg-config vim-common libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -ENV GOARM 6 -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux -ENV RUNC_BUILDTAGS apparmor selinux - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO raspbian -ENV SUITE jessie - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/raspbian-stretch/Dockerfile b/components/packaging/deb/raspbian-stretch/Dockerfile new file mode 100644 index 00000000000..d574ae64a2c --- /dev/null +++ b/components/packaging/deb/raspbian-stretch/Dockerfile @@ -0,0 +1,32 @@ +ARG GO_IMAGE +FROM ${GO_IMAGE} as golang + +FROM resin/rpi-raspbian:stretch + +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 + +COPY common/ /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 mkdir -p /go/src/github.com/crosbymichael && tar -xzf /sources/containerd-proxy.tgz -C /go/src/github.com/crosbymichael + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO raspbian +ENV SUITE stretch + +COPY --from=golang /usr/local/go /usr/local/go + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/raspbian-stretch/Dockerfile.armv7l b/components/packaging/deb/raspbian-stretch/Dockerfile.armv7l deleted file mode 100644 index b075039b9fc..00000000000 --- a/components/packaging/deb/raspbian-stretch/Dockerfile.armv7l +++ /dev/null @@ -1,33 +0,0 @@ -FROM resin/rpi-raspbian:stretch - -# allow replacing archive mirror -ARG APT_MIRROR=archive.raspbian.org -RUN sed -ri "s/archive.raspbian.org/$APT_MIRROR/g" /etc/apt/sources.list - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -ENV GOARM 6 -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO raspbian -ENV SUITE stretch - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-bionic/Dockerfile b/components/packaging/deb/ubuntu-bionic/Dockerfile new file mode 100644 index 00000000000..690d71629ae --- /dev/null +++ b/components/packaging/deb/ubuntu-bionic/Dockerfile @@ -0,0 +1,32 @@ +ARG GO_IMAGE +FROM ${GO_IMAGE} as golang + +FROM ubuntu:bionic + +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 + +COPY common/ /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 mkdir -p /go/src/github.com/crosbymichael && tar -xzf /sources/containerd-proxy.tgz -C /go/src/github.com/crosbymichael + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO ubuntu +ENV SUITE bionic + +COPY --from=golang /usr/local/go /usr/local/go + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-bionic/Dockerfile.aarch64 b/components/packaging/deb/ubuntu-bionic/Dockerfile.aarch64 deleted file mode 100644 index 7d30697ef2d..00000000000 --- a/components/packaging/deb/ubuntu-bionic/Dockerfile.aarch64 +++ /dev/null @@ -1,29 +0,0 @@ -FROM ubuntu:bionic - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION - -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-arm64.tar.gz" | tar xzC /usr/local -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor seccomp selinux -ENV RUNC_BUILDTAGS apparmor seccomp selinux - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE bionic - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-bionic/Dockerfile.armv7l b/components/packaging/deb/ubuntu-bionic/Dockerfile.armv7l deleted file mode 100644 index a005c88fc0e..00000000000 --- a/components/packaging/deb/ubuntu-bionic/Dockerfile.armv7l +++ /dev/null @@ -1,28 +0,0 @@ -FROM ubuntu:bionic - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE bionic - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-bionic/Dockerfile.ppc64le b/components/packaging/deb/ubuntu-bionic/Dockerfile.ppc64le deleted file mode 100644 index 3c848442475..00000000000 --- a/components/packaging/deb/ubuntu-bionic/Dockerfile.ppc64le +++ /dev/null @@ -1,28 +0,0 @@ -FROM ubuntu:bionic - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev pkg-config vim-common libseccomp-dev libsystemd-dev libltdl-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-ppc64le.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE bionic - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-bionic/Dockerfile.s390x b/components/packaging/deb/ubuntu-bionic/Dockerfile.s390x deleted file mode 100644 index 8a9ababfbc0..00000000000 --- a/components/packaging/deb/ubuntu-bionic/Dockerfile.s390x +++ /dev/null @@ -1,28 +0,0 @@ -FROM ubuntu:bionic - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-s390x.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE bionic - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-bionic/Dockerfile.x86_64 b/components/packaging/deb/ubuntu-bionic/Dockerfile.x86_64 deleted file mode 100644 index c7ae56012e1..00000000000 --- a/components/packaging/deb/ubuntu-bionic/Dockerfile.x86_64 +++ /dev/null @@ -1,28 +0,0 @@ -FROM ubuntu:bionic - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE bionic - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-trusty/Dockerfile b/components/packaging/deb/ubuntu-trusty/Dockerfile new file mode 100644 index 00000000000..d0681457f59 --- /dev/null +++ b/components/packaging/deb/ubuntu-trusty/Dockerfile @@ -0,0 +1,32 @@ +ARG GO_IMAGE +FROM ${GO_IMAGE} as golang + +FROM ubuntu:trusty + +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 + +COPY common/ /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 mkdir -p /go/src/github.com/crosbymichael && tar -xzf /sources/containerd-proxy.tgz -C /go/src/github.com/crosbymichael + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO ubuntu +ENV SUITE trusty + +COPY --from=golang /usr/local/go /usr/local/go + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-trusty/Dockerfile.armv7l b/components/packaging/deb/ubuntu-trusty/Dockerfile.armv7l deleted file mode 100644 index 98b6dabb203..00000000000 --- a/components/packaging/deb/ubuntu-trusty/Dockerfile.armv7l +++ /dev/null @@ -1,30 +0,0 @@ -FROM arm32v7/ubuntu:trusty - -# Temorary fix until ubuntu trusty package repositories are back up -RUN sed -i 's|security.ubuntu.com/ubuntu|ports.ubuntu.com/ubuntu-ports|' /etc/apt/sources.list -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev pkg-config vim-common libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux -ENV RUNC_BUILDTAGS apparmor selinux - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE trusty - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-trusty/Dockerfile.x86_64 b/components/packaging/deb/ubuntu-trusty/Dockerfile.x86_64 deleted file mode 100644 index b155e964e08..00000000000 --- a/components/packaging/deb/ubuntu-trusty/Dockerfile.x86_64 +++ /dev/null @@ -1,28 +0,0 @@ -FROM ubuntu:trusty - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev pkg-config vim-common libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux -ENV RUNC_BUILDTAGS apparmor selinux - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE trusty - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-xenial/Dockerfile b/components/packaging/deb/ubuntu-xenial/Dockerfile new file mode 100644 index 00000000000..d0681457f59 --- /dev/null +++ b/components/packaging/deb/ubuntu-xenial/Dockerfile @@ -0,0 +1,32 @@ +ARG GO_IMAGE +FROM ${GO_IMAGE} as golang + +FROM ubuntu:trusty + +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 + +COPY common/ /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 mkdir -p /go/src/github.com/crosbymichael && tar -xzf /sources/containerd-proxy.tgz -C /go/src/github.com/crosbymichael + +RUN ln -snf /go/src/github.com/docker/cli /root/build-deb/cli + +ENV DISTRO ubuntu +ENV SUITE trusty + +COPY --from=golang /usr/local/go /usr/local/go + +WORKDIR /root/build-deb +COPY build-deb /root/build-deb/build-deb + +ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-xenial/Dockerfile.aarch64 b/components/packaging/deb/ubuntu-xenial/Dockerfile.aarch64 deleted file mode 100644 index 2b349ddd7dc..00000000000 --- a/components/packaging/deb/ubuntu-xenial/Dockerfile.aarch64 +++ /dev/null @@ -1,29 +0,0 @@ -FROM arm64v8/ubuntu:xenial - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION - -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-arm64.tar.gz" | tar xzC /usr/local -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor seccomp selinux -ENV RUNC_BUILDTAGS apparmor seccomp selinux - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE xenial - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-xenial/Dockerfile.armv7l b/components/packaging/deb/ubuntu-xenial/Dockerfile.armv7l deleted file mode 100644 index 74861d7c448..00000000000 --- a/components/packaging/deb/ubuntu-xenial/Dockerfile.armv7l +++ /dev/null @@ -1,28 +0,0 @@ -FROM arm32v7/ubuntu:xenial - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE xenial - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-xenial/Dockerfile.ppc64le b/components/packaging/deb/ubuntu-xenial/Dockerfile.ppc64le deleted file mode 100644 index 99dffa363f7..00000000000 --- a/components/packaging/deb/ubuntu-xenial/Dockerfile.ppc64le +++ /dev/null @@ -1,28 +0,0 @@ -FROM ppc64le/ubuntu:xenial - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-ppc64le.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE xenial - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-xenial/Dockerfile.s390x b/components/packaging/deb/ubuntu-xenial/Dockerfile.s390x deleted file mode 100644 index 85dccfc8b57..00000000000 --- a/components/packaging/deb/ubuntu-xenial/Dockerfile.s390x +++ /dev/null @@ -1,28 +0,0 @@ -FROM s390x/ubuntu:xenial - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-s390x.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE xenial - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] diff --git a/components/packaging/deb/ubuntu-xenial/Dockerfile.x86_64 b/components/packaging/deb/ubuntu-xenial/Dockerfile.x86_64 deleted file mode 100644 index 9e19d720e7a..00000000000 --- a/components/packaging/deb/ubuntu-xenial/Dockerfile.x86_64 +++ /dev/null @@ -1,28 +0,0 @@ -FROM ubuntu:xenial - -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* - -ARG GO_VERSION -RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local -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 - -COPY common/ /root/build-deb/debian -COPY build-deb /root/build-deb/build-deb - -RUN mkdir -p /go/src/github.com/docker && \ - mkdir -p /go/src/github.com/opencontainers && \ - ln -snf /engine /root/build-deb/engine && \ - ln -snf /cli /root/build-deb/cli && \ - ln -snf /root/build-deb/engine /go/src/github.com/docker/docker && \ - ln -snf /root/build-deb/cli /go/src/github.com/docker/cli - - -ENV DISTRO ubuntu -ENV SUITE xenial - -WORKDIR /root/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"]