mirror of https://github.com/k3s-io/k3s
Clean cross-build image and update to protoc 3.0.2
parent
ce7e7e3c34
commit
2812b55263
|
@ -33,24 +33,14 @@ ENV KUBE_CROSSPLATFORMS \
|
|||
windows/amd64 windows/386
|
||||
|
||||
# Pre-compile the standard go library when cross-compiling. This is much easier now when we have go1.5+
|
||||
RUN for platform in ${KUBE_CROSSPLATFORMS}; do GOOS=${platform%/*} GOARCH=${platform##*/} go install std; done
|
||||
RUN for platform in ${KUBE_CROSSPLATFORMS}; do GOOS=${platform%/*} GOARCH=${platform##*/} go install std; done \
|
||||
&& go clean -cache
|
||||
|
||||
# Install g++, then download and install protoc for generating protobuf output
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y g++ rsync jq apt-utils file patch \
|
||||
&& apt-get install -y rsync jq apt-utils file patch unzip \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /usr/local/src/protobuf \
|
||||
&& cd /usr/local/src/protobuf \
|
||||
&& curl -sSL https://github.com/google/protobuf/releases/download/v3.0.0-beta-2/protobuf-cpp-3.0.0-beta-2.tar.gz | tar -xzv \
|
||||
&& cd protobuf-3.0.0-beta-2 \
|
||||
&& ./configure \
|
||||
&& make install \
|
||||
&& ldconfig \
|
||||
&& cd .. \
|
||||
&& rm -rf protobuf-3.0.0-beta-2 \
|
||||
&& protoc --version
|
||||
|
||||
# Use dynamic cgo linking for architectures other than amd64 for the server platforms
|
||||
# To install crossbuild essential for other architectures add the following repository.
|
||||
RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" > /etc/apt/sources.list.d/cgocrosscompiling.list \
|
||||
|
@ -60,6 +50,16 @@ RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" > /etc/apt/
|
|||
&& for platform in ${KUBE_DYNAMIC_CROSSPLATFORMS}; do apt-get install -y crossbuild-essential-${platform}; done \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN PROTOBUF_VERSION=3.0.2; ZIPNAME="protoc-${PROTOBUF_VERSION}-linux-x86_64.zip"; \
|
||||
mkdir /tmp/protoc && cd /tmp/protoc \
|
||||
&& wget "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/${ZIPNAME}" \
|
||||
&& unzip "${ZIPNAME}" \
|
||||
&& chmod -R +rX /tmp/protoc \
|
||||
&& cp -pr bin /usr/local \
|
||||
&& cp -pr include /usr/local \
|
||||
&& rm -rf /tmp/protoc \
|
||||
&& protoc --version
|
||||
|
||||
# work around 64MB tmpfs size in Docker 1.6
|
||||
ENV TMPDIR /tmp.k8s
|
||||
RUN mkdir $TMPDIR \
|
||||
|
@ -68,7 +68,8 @@ RUN mkdir $TMPDIR \
|
|||
|
||||
# Get the code coverage tool and goimports
|
||||
RUN go get golang.org/x/tools/cmd/cover \
|
||||
golang.org/x/tools/cmd/goimports
|
||||
golang.org/x/tools/cmd/goimports \
|
||||
&& go clean -cache
|
||||
|
||||
# Download and symlink etcd. We need this for our integration tests.
|
||||
RUN export ETCD_VERSION=v3.2.24; \
|
||||
|
|
|
@ -1 +1 @@
|
|||
v1.11.1-1
|
||||
v1.11.1-2
|
||||
|
|
Loading…
Reference in New Issue