Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
1ba06b04
Unverified
Commit
1ba06b04
authored
Oct 17, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69939 from ixdy/clean-crossbuild-protoc-3.0.2
Clean cross-build image and update to protoc 3.0.2
parents
060ecb88
2812b552
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
Dockerfile
build/build-image/cross/Dockerfile
+15
-14
VERSION
build/build-image/cross/VERSION
+1
-1
No files found.
build/build-image/cross/Dockerfile
View file @
1ba06b04
...
@@ -33,24 +33,14 @@ ENV KUBE_CROSSPLATFORMS \
...
@@ -33,24 +33,14 @@ ENV KUBE_CROSSPLATFORMS \
windows/amd64 windows/386
windows/amd64 windows/386
# Pre-compile the standard go library when cross-compiling. This is much easier now when we have go1.5+
# 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
# Install g++, then download and install protoc for generating protobuf output
RUN
apt-get update
\
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/
*
&&
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
# Use dynamic cgo linking for architectures other than amd64 for the server platforms
# To install crossbuild essential for other architectures add the following repository.
# 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
\
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/
...
@@ -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
\
&&
for
platform
in
${
KUBE_DYNAMIC_CROSSPLATFORMS
}
;
do
apt-get
install
-y
crossbuild-essential-
${
platform
}
;
done
\
&&
apt-get clean
&&
rm
-rf
/var/lib/apt/lists/
*
&&
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
# work around 64MB tmpfs size in Docker 1.6
ENV
TMPDIR /tmp.k8s
ENV
TMPDIR /tmp.k8s
RUN
mkdir
$TMPDIR
\
RUN
mkdir
$TMPDIR
\
...
@@ -68,7 +68,8 @@ RUN mkdir $TMPDIR \
...
@@ -68,7 +68,8 @@ RUN mkdir $TMPDIR \
# Get the code coverage tool and goimports
# Get the code coverage tool and goimports
RUN
go get golang.org/x/tools/cmd/cover
\
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.
# Download and symlink etcd. We need this for our integration tests.
RUN
export
ETCD_VERSION
=
v3.2.24
;
\
RUN
export
ETCD_VERSION
=
v3.2.24
;
\
...
...
build/build-image/cross/VERSION
View file @
1ba06b04
v1.11.1-
1
v1.11.1-
2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment