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
2812b552
Commit
2812b552
authored
Oct 16, 2018
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean cross-build image and update to protoc 3.0.2
parent
ce7e7e3c
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 @
2812b552
...
...
@@ -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
;
\
...
...
build/build-image/cross/VERSION
View file @
2812b552
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