Skip to content

File tree

16 files changed

+116
-61
lines changed

16 files changed

+116
-61
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.swp
2+
*.swo
23
/build/
34
/env/

‎.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ go:
1010
script:
1111
- make pull-images
1212
# uncomment to build fresh images
13-
# - docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
14-
# - make images
15-
# - make push-images
13+
#- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
14+
#- make images
15+
#- make push-images
1616
- make deps
1717
- make
1818

‎docker/xgo-image-deb6/base/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ ADD bootstrap.sh /bootstrap.sh
3131
ENV BOOTSTRAP /bootstrap.sh
3232
RUN chmod +x $BOOTSTRAP
3333

34+
# Inject the new Go root distribution downloader and secondary bootstrapper
35+
ADD bootstrap_pure.sh /bootstrap_pure.sh
36+
ENV BOOTSTRAP_PURE /bootstrap_pure.sh
37+
RUN chmod +x $BOOTSTRAP_PURE
38+
3439
# Inject the C dependency cross compiler
3540
ADD build_deps.sh /build_deps.sh
3641
ENV BUILD_DEPS /build_deps.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
#
3+
# Contains the Go tool-chain pure-Go bootstrapper, that as of Go 1.5, initiates
4+
# not only a few pre-built Go cross compilers, but rather bootstraps all of the
5+
# supported platforms from the origin Linux amd64 distribution.
6+
#
7+
# Usage: bootstrap.sh
8+
#
9+
# Needed environment variables:
10+
# FETCH - Remote file fetcher and checksum verifier (injected by image)
11+
# ROOT_DIST - 64 bit Linux Go binary distribution package
12+
# ROOT_DIST_SHA1 - 64 bit Linux Go distribution package checksum
13+
set -e
14+
15+
# Download, verify and install the root distribution
16+
$FETCH $ROOT_DIST $ROOT_DIST_SHA1
17+
18+
tar -C /usr/local -xzf `basename $ROOT_DIST`
19+
rm -f `basename $ROOT_DIST`
20+
21+
export GOROOT=/usr/local/go
22+
export GOROOT_BOOTSTRAP=$GOROOT
23+
24+
# Pre-build all guest distributions based on the root distribution
25+
echo "Bootstrapping linux/386..."
26+
GOOS=linux GOARCH=386 CGO_ENABLED=1 go install std

‎docker/xgo-image-deb6/beats-builder/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tudorg/xgo-deb6-1.4.2
1+
FROM tudorg/xgo-deb6-1.5.1
22

33
MAINTAINER Tudor Golubenco <tudor@elastic.co>
44

‎docker/xgo-image-deb6/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

33
docker build --rm=true -t tudorg/xgo-deb6-base base/ && \
4-
docker build --rm=true -t tudorg/xgo-deb6-1.4.2 go-1.4.2/ &&
4+
docker build --rm=true -t tudorg/xgo-deb6-1.5.1 go-1.5.1/ &&
55
docker build --rm=true -t tudorg/beats-builder-deb6 beats-builder

‎docker/xgo-image-deb6/go-1.4.2/Dockerfile

-18
This file was deleted.
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Go cross compiler (xgo): Go 1.5.1 layer
2+
# Copyright (c) 2014 Péter Szilágyi. All rights reserved.
3+
#
4+
# Released under the MIT license.
5+
6+
FROM tudorg/xgo-deb6-base
7+
8+
MAINTAINER Tudor Golubenco <tudor@elastic.co>
9+
10+
# Configure the root Go distribution and bootstrap based on it
11+
RUN \
12+
export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \
13+
export ROOT_DIST_SHA1=46eecd290d8803887dec718c691cc243f2175fe0 && \
14+
\
15+
$BOOTSTRAP_PURE

‎docker/xgo-image/base/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ ADD bootstrap.sh /bootstrap.sh
4949
ENV BOOTSTRAP /bootstrap.sh
5050
RUN chmod +x $BOOTSTRAP
5151

52+
# Inject the new Go root distribution downloader and secondary bootstrapper
53+
ADD bootstrap_pure.sh /bootstrap_pure.sh
54+
ENV BOOTSTRAP_PURE /bootstrap_pure.sh
55+
RUN chmod +x $BOOTSTRAP_PURE
56+
5257
# Inject the C dependency cross compiler
5358
ADD build_deps.sh /build_deps.sh
5459
ENV BUILD_DEPS /build_deps.sh

‎docker/xgo-image/base/bootstrap.sh

-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ set -e
1919
# Download and verify all the binary packages
2020
$FETCH $DIST_LINUX_64 $DIST_LINUX_64_SHA1
2121
$FETCH $DIST_LINUX_32 $DIST_LINUX_32_SHA1
22-
$FETCH $DIST_LINUX_ARM $DIST_LINUX_ARM_SHA1
2322
$FETCH $DIST_OSX_64 $DIST_OSX_64_SHA1
24-
$FETCH $DIST_OSX_32 $DIST_OSX_32_SHA1
2523
$FETCH $DIST_WIN_64 $DIST_WIN_64_SHA1
2624
$FETCH $DIST_WIN_32 $DIST_WIN_32_SHA1
2725

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
#
3+
# Contains the Go tool-chain pure-Go bootstrapper, that as of Go 1.5, initiates
4+
# not only a few pre-built Go cross compilers, but rather bootstraps all of the
5+
# supported platforms from the origin Linux amd64 distribution.
6+
#
7+
# Usage: bootstrap.sh
8+
#
9+
# Needed environment variables:
10+
# FETCH - Remote file fetcher and checksum verifier (injected by image)
11+
# ROOT_DIST - 64 bit Linux Go binary distribution package
12+
# ROOT_DIST_SHA1 - 64 bit Linux Go distribution package checksum
13+
set -e
14+
15+
# Download, verify and install the root distribution
16+
$FETCH $ROOT_DIST $ROOT_DIST_SHA1
17+
18+
tar -C /usr/local -xzf `basename $ROOT_DIST`
19+
rm -f `basename $ROOT_DIST`
20+
21+
export GOROOT=/usr/local/go
22+
export GOROOT_BOOTSTRAP=$GOROOT
23+
24+
# Pre-build all guest distributions based on the root distribution
25+
echo "Bootstrapping linux/386..."
26+
GOOS=linux GOARCH=386 CGO_ENABLED=1 go install std
27+
28+
echo "Bootstrapping linux/arm..."
29+
GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-gnueabi-gcc go install std
30+
31+
echo "Bootstrapping windows/amd64..."
32+
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go install std
33+
34+
echo "Bootstrapping windows/386..."
35+
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc go install std
36+
37+
echo "Bootstrapping darwin/amd64..."
38+
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 CC=o64-clang go install std
39+
40+
echo "Bootstrapping darwin/386..."
41+
GOOS=darwin GOARCH=386 CGO_ENABLED=1 CC=o32-clang go install std

‎docker/xgo-image/base/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ CC=i686-w64-mingw32-gcc GOOS=windows GOARCH=386 CGO_ENABLED=1 go build $V -o $NA
103103
echo "Compiling for darwin/amd64..."
104104
CC=o64-clang HOST=x86_64-apple-darwin10 PREFIX=/usr/local $BUILD_DEPS /deps
105105
CC=o64-clang GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go get -d ./$PACK
106-
CC=o64-clang GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build $V $R -o $NAME-darwin-amd64$R ./$PACK
106+
CC=o64-clang GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -ldflags=-s $V $R -o $NAME-darwin-amd64$R ./$PACK
107107

108108
#echo "Compiling for darwin/386..."
109109
#CC=o32-clang HOST=i386-apple-darwin10 PREFIX=/usr/local $BUILD_DEPS /deps

‎docker/xgo-image/beats-builder/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tudorg/xgo-1.4.2
1+
FROM tudorg/xgo-1.5.1
22

33
MAINTAINER Tudor Golubenco <tudor@elastic.co>
44

‎docker/xgo-image/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

33
docker build --rm=true -t tudorg/xgo-base base/ && \
4-
docker build --rm=true -t tudorg/xgo-1.4.2 go-1.4.2/ &&
4+
docker build --rm=true -t tudorg/xgo-1.5.1 go-1.5.1/ &&
55
docker build --rm=true -t tudorg/beats-builder beats-builder

‎docker/xgo-image/go-1.4.2/Dockerfile

-33
This file was deleted.

‎docker/xgo-image/go-1.5.1/Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Go cross compiler (xgo): Go 1.5.1 layer
2+
# Copyright (c) 2014 Péter Szilágyi. All rights reserved.
3+
#
4+
# Released under the MIT license.
5+
6+
FROM tudorg/xgo-base
7+
8+
MAINTAINER Tudor Golubenco <tudor@elastic.co>
9+
10+
# Configure the root Go distribution and bootstrap based on it
11+
RUN \
12+
export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \
13+
export ROOT_DIST_SHA1=46eecd290d8803887dec718c691cc243f2175fe0 && \
14+
\
15+
$BOOTSTRAP_PURE

0 commit comments

Comments
 (0)
Please sign in to comment.