1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #26920 from tophj-ibm/add-1404-make-debs

ppc64le: add files for supporting 14.04 'make debs'
This commit is contained in:
Alexander Morozov 2016-09-27 07:54:57 -07:00 committed by GitHub
commit 1dbf3c65e1
3 changed files with 53 additions and 6 deletions

View file

@ -50,17 +50,40 @@ for version in "${versions[@]}"; do
dh-apparmor # for apparmor debhelper
dh-systemd # for systemd debhelper integration
git # for "git commit" info in "docker -v"
golang-go # ppc64le needs go to bootstrap go
libapparmor-dev # for "sys/apparmor.h"
libdevmapper-dev # for "libdevmapper.h"
libltdl-dev # for pkcs11 "ltdl.h"
libseccomp-dev # for "seccomp.h" & "libseccomp.so"
libsqlite3-dev # for "sqlite3.h"
libsystemd-dev
pkg-config # for detecting things like libsystemd-journal dynamically
)
# trusty uses a different go package name then xenial and newer, so track that for later
goPackage=
case "$suite" in
trusty)
# ppc64le doesn't have go binaries, so install go to bootstrap go
# trusty doesn't have a ppc64le golang-go package
packages+=( golang-1.6 )
goPackage='golang-1.6'
packages+=( libsystemd-journal-dev )
;;
*)
# libseccomp isn't available until ubuntu xenial and is required for "seccomp.h" & "libseccomp.so"
packages+=( golang-go )
goPackage='golang-go'
packages+=( libseccomp-dev )
packages+=( libsystemd-dev )
;;
esac
# buildtags
case "$suite" in
# trusty has no seccomp package
trusty)
runcBuildTags="apparmor selinux"
;;
# ppc64le support was backported into libseccomp 2.2.3-2,
# so enable seccomp by default
*)
@ -89,7 +112,7 @@ for version in "${versions[@]}"; do
echo ' && tar -C /usr/local -xzf golang.tar.gz \' >> "$version/Dockerfile"
echo ' && rm golang.tar.gz \' >> "$version/Dockerfile"
echo ' && cd /usr/local/go/src && ./make.bash 2>&1 \' >> "$version/Dockerfile"
echo ' && apt-get purge -y golang-go && apt-get autoremove -y' >> "$version/Dockerfile"
echo " && apt-get purge -y $goPackage && apt-get autoremove -y" >> "$version/Dockerfile"
echo >> "$version/Dockerfile"
echo 'ENV PATH $PATH:/usr/local/go/bin' >> "$version/Dockerfile"

View file

@ -0,0 +1,24 @@
#
# THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/ppc64le/generate.sh"!
#
FROM ppc64le/ubuntu:trusty
RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libsqlite3-dev pkg-config golang-1.6 libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
ENV GO_VERSION 1.7.1
ENV GO_DOWNLOAD_URL https://golang.org/dl/go${GO_VERSION}.src.tar.gz
ENV GOROOT_BOOTSTRAP /usr/lib/go-1.6
RUN curl -fsSL "$GO_DOWNLOAD_URL" -o golang.tar.gz \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz \
&& cd /usr/local/go/src && ./make.bash 2>&1 \
&& apt-get purge -y golang-1.6 && apt-get autoremove -y
ENV PATH $PATH:/usr/local/go/bin
ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux
ENV RUNC_BUILDTAGS apparmor selinux

View file

@ -4,7 +4,7 @@
FROM ppc64le/ubuntu:xenial
RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git golang-go libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev libsqlite3-dev libsystemd-dev pkg-config --no-install-recommends && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libsqlite3-dev pkg-config golang-go libseccomp-dev libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
# Install Go
# ppc64le doesn't have official go binaries, so use the version of go installed from the image