-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add aarch64 support #35
Changes from 9 commits
38a463d
0a6b108
f1623b7
588f1da
1e48ef1
bfd8486
7f516da
08a7fa3
4d1a3a3
9220fae
bbe2624
04e841d
106ee35
b3314a3
9cb1ffb
03f02ec
c746146
0a3835b
d76c1d6
f007ee9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM multiarch/debian-debootstrap:arm64-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 echo "deb http://$APT_MIRROR/debian jessie-backports main" >> /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/* | ||
|
||
ENV GO_VERSION 1.9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency across arches, this should still be 1.8.3, shouldn't it? (and they should all be updated together?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh duh, there weren't binary releases of Go for arm64 until 1.9 -- makes more sense. 😇 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, that may be an issue still; we were holding off bumping to 1.9 as there were still some issues (possibly not for all architectures though); moby/moby#33892 |
||
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 jessie | ||
|
||
WORKDIR /root/build-deb | ||
|
||
ENTRYPOINT ["/root/build-deb/build-deb"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM multiarch/debian-debootstrap:arm64-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/* | ||
|
||
ENV GO_VERSION 1.9 | ||
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"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM multiarch/ubuntu-core:arm64-yakkety | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This for ubuntu zesty, so arm64-yakkety is incorrect image. I think using arm64v8/ubuntu:zesty is would be the best here. arm64v8/ seems to be the closest thing to official debian/ubuntu images and should probably be used elsewhere |
||
|
||
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/* | ||
|
||
ENV GO_VERSION 1.9 | ||
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 ubuntu | ||
ENV SUITE zesty | ||
|
||
WORKDIR /root/build-deb | ||
|
||
ENTRYPOINT ["/root/build-deb/build-deb"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ if [ "$arch" = "x86_64" ]; then | |
img="alpine" | ||
elif [ "$arch" = "armv7l" ]; then | ||
img="armhf/alpine" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this PR shouldn't change the behaviour for other platforms. Probably an artifact of other parallel merges. Upstream already contains the changes for armv7l and aarch64. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, that was the just solved merge conflict |
||
elif [ "$arch" = "aarch64" ]; then | ||
img="arm64v8/alpine" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block is already down a few lines 😄 |
||
elif [ "$arch" = "s390x" ]; then | ||
img="s390x/alpine" | ||
elif [ "$arch" = "aarch64" ]; then | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps use arm64v8/debian:jessie-backports ?