Add parallelism to cross build
Reusable docker engine Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
@ -1,18 +1,2 @@
|
||||
|
||||
FROM golang:1.8.3
|
||||
|
||||
# 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 -qq && apt-get install -y -q \
|
||||
libltdl-dev \
|
||||
gcc-mingw-w64 \
|
||||
parallel \
|
||||
;
|
||||
|
||||
COPY dockerfiles/osx-cross.sh /tmp/
|
||||
RUN /tmp/osx-cross.sh
|
||||
ENV PATH /osxcross/target/bin:$PATH
|
||||
|
||||
FROM dockercore/golang-cross@sha256:d24e7affa3a85d460d2303c2549f03fc866f2b97d771ccf07b0e6e2b411dd207
|
||||
WORKDIR /go/src/github.com/docker/cli
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Install dependencies required to cross compile osx, then cleanup
|
||||
#
|
||||
# TODO: this should be a separate build stage when CI supports it
|
||||
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
PKG_DEPS="patch xz-utils clang"
|
||||
|
||||
apt-get update -qq
|
||||
apt-get install -y -q $PKG_DEPS
|
||||
|
||||
OSX_SDK=MacOSX10.11.sdk
|
||||
OSX_CROSS_COMMIT=a9317c18a3a457ca0a657f08cc4d0d43c6cf8953
|
||||
OSXCROSS_PATH="/osxcross"
|
||||
|
||||
echo "Cloning osxcross"
|
||||
time git clone https://github.com/tpoechtrager/osxcross.git $OSXCROSS_PATH
|
||||
cd $OSXCROSS_PATH
|
||||
git checkout -q $OSX_CROSS_COMMIT
|
||||
|
||||
echo "Downloading OSX SDK"
|
||||
time curl -sSL https://s3.dockerproject.org/darwin/v2/${OSX_SDK}.tar.xz \
|
||||
-o "${OSXCROSS_PATH}/tarballs/${OSX_SDK}.tar.xz"
|
||||
|
||||
echo "Building osxcross"
|
||||
UNATTENDED=yes OSX_VERSION_MIN=10.6 ${OSXCROSS_PATH}/build.sh > /dev/null
|
||||
Reference in New Issue
Block a user