Merge pull request #25 from seemethere/add_aarch64_support

Add ubuntu-xenial aarch64 Dockerfile
Upstream-commit: 9d7eb679ea5954f32eb342ff1c26e8cdf4c298cb
Component: packaging
This commit is contained in:
Andrew Hsu
2017-07-20 13:47:21 -07:00
committed by GitHub
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,36 @@
FROM aarch64/ubuntu:xenial
RUN apt-get update && apt-get install -y golang-go 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/*
# Install Go
# We don't have official binary golang 1.7.5 tarballs for ARM64, eigher for Go or
# bootstrap, so we use golang-go (1.6) as bootstrap to build Go from source code.
# We don't use the official ARMv6 released binaries as a GOROOT_BOOTSTRAP, because
# not all ARM64 platforms support 32-bit mode. 32-bit mode is optional for ARMv8.
ENV GO_VERSION 1.8.3
RUN mkdir /usr/src/go && curl -fsSL https://golang.org/dl/go${GO_VERSION}.src.tar.gz | tar -v -C /usr/src/go -xz --strip-components=1 \
&& cd /usr/src/go/src \
&& GOOS=linux GOARCH=arm64 GOROOT_BOOTSTRAP="$(go env GOROOT)" ./make.bash
ENV GOPATH /go
ENV PATH /go/bin:/usr/src/go/bin:$PATH
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"]

View File

@ -9,6 +9,8 @@ elif [ "$arch" = "armv7l" ]; then
img="armhf/alpine"
elif [ "$arch" = "s390x" ]; then
img="s390x/alpine"
elif [ "$arch" = "aarch64" ]; then
img="aarch64/alpine"
else
echo "Architecture $(arch) not supported"
exit 1;