mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
Add armhf dockerfiles for deb building (#4)
Add armhf dockerfiles for deb building Signed-off-by: Eli Uriegas <seemethere101@gmail.com> Upstream-commit: f0c8cea1b79b049743cd1503f7ac4a34c265f476 Component: packaging
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
SHELL:=/bin/bash
|
||||
ALPINE:=$(shell $(CURDIR)/../detect_alpine_image)
|
||||
ARCH:=amd64
|
||||
ENGINE_DIR:=$(CURDIR)/../../engine
|
||||
CLI_DIR:=$(CURDIR)/../../cli
|
||||
GITCOMMIT?=$(shell cd $(ENGINE_DIR) && git rev-parse --short HEAD)
|
||||
VERSION?=$(shell cat $(ENGINE_DIR)/VERSION)
|
||||
DOCKER_EXPERIMENTAL:=0
|
||||
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown
|
||||
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v $(ALPINE) chown
|
||||
|
||||
.PHONY: help clean deb ubuntu debian ubuntu-xenial ubuntu-trusty ubuntu-yakkety ubuntu-zesty debian-jessie debian-stretch debian-wheezy
|
||||
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -x
|
||||
# I want to rip this install-binaries script out so badly
|
||||
cd engine && \
|
||||
TMP_GOPATH="/go" hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini && \
|
||||
cd -
|
||||
cd engine
|
||||
TMP_GOPATH="/go" bash hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Binaries required for package building not installed correctly."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
cd -
|
||||
echo VERSION AAA $VERSION
|
||||
|
||||
VERSION=${VERSION:-$( cat engine/VERSION )}
|
||||
|
||||
@@ -12,7 +12,7 @@ override_dh_gencontrol:
|
||||
|
||||
override_dh_auto_build:
|
||||
cd engine && ./hack/make.sh dynbinary
|
||||
cd cli && LDFLAGS='' make VERSION=$(VERSION) GITCOMMIT=$(DOCKER_GITCOMMIT) dynbinary
|
||||
LDFLAGS='' make -C cli VERSION=$(VERSION) GITCOMMIT=$(DOCKER_GITCOMMIT) dynbinary
|
||||
# ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here
|
||||
|
||||
override_dh_auto_test:
|
||||
|
||||
34
components/packaging/deb/debian-jessie/Dockerfile.armhf
Normal file
34
components/packaging/deb/debian-jessie/Dockerfile.armhf
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM armhf/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 pkg-config vim-common libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV GO_VERSION 1.8.1
|
||||
RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
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"]
|
||||
34
components/packaging/deb/debian-stretch/Dockerfile.armhf
Normal file
34
components/packaging/deb/debian-stretch/Dockerfile.armhf
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM armhf/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/*
|
||||
|
||||
ENV GO_VERSION 1.8.1
|
||||
RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
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"]
|
||||
36
components/packaging/deb/debian-wheezy/Dockerfile.armhf
Normal file
36
components/packaging/deb/debian-wheezy/Dockerfile.armhf
Normal file
@@ -0,0 +1,36 @@
|
||||
FROM armhf/debian:wheezy-backports
|
||||
|
||||
# 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 sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list.d/backports.list
|
||||
|
||||
RUN apt-get update && apt-get install -y -t wheezy-backports btrfs-tools --no-install-recommends && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install -y apparmor bash-completion build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev pkg-config vim-common --no-install-recommends && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV GO_VERSION 1.8.1
|
||||
RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
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 wheezy
|
||||
|
||||
WORKDIR /root/build-deb
|
||||
|
||||
ENTRYPOINT ["/root/build-deb/build-deb"]
|
||||
30
components/packaging/deb/ubuntu-trusty/Dockerfile.armhf
Normal file
30
components/packaging/deb/ubuntu-trusty/Dockerfile.armhf
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM armhf/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/*
|
||||
|
||||
ENV GO_VERSION 1.8.1
|
||||
RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
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"]
|
||||
30
components/packaging/deb/ubuntu-xenial/Dockerfile.armhf
Normal file
30
components/packaging/deb/ubuntu-xenial/Dockerfile.armhf
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM armhf/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/*
|
||||
|
||||
ENV GO_VERSION 1.8.1
|
||||
RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
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"]
|
||||
30
components/packaging/deb/ubuntu-yakkety/Dockerfile.armhf
Normal file
30
components/packaging/deb/ubuntu-yakkety/Dockerfile.armhf
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM armhf/ubuntu:yakkety
|
||||
|
||||
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/*
|
||||
|
||||
ENV GO_VERSION 1.8.1
|
||||
RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
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 yakkety
|
||||
|
||||
WORKDIR /root/build-deb
|
||||
|
||||
ENTRYPOINT ["/root/build-deb/build-deb"]
|
||||
30
components/packaging/deb/ubuntu-zesty/Dockerfile.armhf
Normal file
30
components/packaging/deb/ubuntu-zesty/Dockerfile.armhf
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM armhf/ubuntu:yakkety
|
||||
|
||||
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/*
|
||||
|
||||
ENV GO_VERSION 1.8.1
|
||||
RUN curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
ENV GOPATH /go
|
||||
|
||||
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 zesty
|
||||
|
||||
WORKDIR /root/build-deb
|
||||
|
||||
ENTRYPOINT ["/root/build-deb/build-deb"]
|
||||
17
components/packaging/detect_alpine_image
Executable file
17
components/packaging/detect_alpine_image
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
arch="$(uname -m)"
|
||||
img="unknown"
|
||||
|
||||
if [ "$arch" = "x86_64" ]; then
|
||||
img="alpine"
|
||||
elif [ "$arch" = "armv7l" ]; then
|
||||
img="armhf/alpine"
|
||||
elif [ "$arch" = "s390x" ]; then
|
||||
img="s390x/alpine"
|
||||
else
|
||||
echo "Architecture $(arch) not supported"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "$img"
|
||||
Reference in New Issue
Block a user