1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Update/fix build tags, Dockerfile, and release.sh for proper building and releasing of linux/386 and linux/arm cross-compiled client binaries

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
This commit is contained in:
Tianon Gravi 2014-01-31 03:16:42 -07:00
parent 45dd051e8e
commit 065dd231dd
31 changed files with 51 additions and 23 deletions

View file

@ -68,8 +68,9 @@ ENV GOPATH /go:/go/src/github.com/dotcloud/docker/vendor
RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1 RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1
# Compile Go for cross compilation # Compile Go for cross compilation
ENV DOCKER_CROSSPLATFORMS darwin/amd64 darwin/386 ENV DOCKER_CROSSPLATFORMS linux/386 linux/arm darwin/amd64 darwin/386
# TODO add linux/386 and linux/arm # (set an explicit GOARM of 5 for maximum compatibility)
ENV GOARM 5
RUN cd /usr/local/go/src && bash -xc 'for platform in $DOCKER_CROSSPLATFORMS; do GOOS=${platform%/*} GOARCH=${platform##*/} ./make.bash --no-clean 2>&1; done' RUN cd /usr/local/go/src && bash -xc 'for platform in $DOCKER_CROSSPLATFORMS; do GOOS=${platform%/*} GOARCH=${platform##*/} ./make.bash --no-clean 2>&1; done'
# Grab Go's cover tool for dead-simple code coverage testing # Grab Go's cover tool for dead-simple code coverage testing

View file

@ -1,4 +1,5 @@
// +build: !linux !amd64 // +build !linux !amd64
package archive package archive
import "syscall" import "syscall"

View file

@ -1,3 +1,5 @@
// +build amd64
package lxc package lxc
import ( import (

View file

@ -1,4 +1,5 @@
// +build: !linux !amd64 // +build !linux !amd64
package lxc package lxc
func setHostname(hostname string) error { func setHostname(hostname string) error {

View file

@ -1,3 +1,5 @@
// +build amd64
package aufs package aufs
import "syscall" import "syscall"

View file

@ -1,4 +1,5 @@
// +build: !linux !amd64 // +build !linux !amd64
package aufs package aufs
import "errors" import "errors"

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package btrfs package btrfs

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -1,4 +1,4 @@
// +build linux // +build linux,amd64
package devmapper package devmapper

View file

@ -151,7 +151,8 @@ release_build() {
S3ARCH=i386 S3ARCH=i386
;; ;;
arm) arm)
# GOARCH is fine S3ARCH=armel
# someday, we might potentially support mutliple GOARM values, in which case we might get armhf here too
;; ;;
*) *)
echo >&2 "error: can't convert $S3ARCH to an appropriate value for 'uname -m'" echo >&2 "error: can't convert $S3ARCH to an appropriate value for 'uname -m'"

View file

@ -1,3 +1,5 @@
// +build amd64
package graphdb package graphdb
import ( import (

View file

@ -1,3 +1,5 @@
// +build !linux !amd64
package graphdb package graphdb
func NewSqliteConn(root string) (*Database, error) { func NewSqliteConn(root string) (*Database, error) {

View file

@ -1,3 +1,5 @@
// +build amd64
package mount package mount
import ( import (

View file

@ -1,4 +1,5 @@
// +build: !linux !amd64 // +build !linux !amd64
package mount package mount
func parseOptions(options string) (int, string) { func parseOptions(options string) (int, string) {

View file

@ -1,3 +1,5 @@
// +build amd64
package mount package mount
import ( import (

View file

@ -1,4 +1,5 @@
// +build: !linux !amd64 // +build !linux !amd64
package mount package mount
func mount(device, target, mType string, flag uintptr, data string) error { func mount(device, target, mType string, flag uintptr, data string) error {

View file

@ -1,3 +1,5 @@
// +build amd64
package netlink package netlink
import ( import (

View file

@ -1,4 +1,5 @@
// +build: !linux !amd64 // +build !linux !amd64
package netlink package netlink
import ( import (

View file

@ -1,3 +1,5 @@
// +build amd64
package docker package docker
// FIXME: This could be easily rewritten in pure Go // FIXME: This could be easily rewritten in pure Go

View file

@ -1,4 +1,5 @@
// +build: !linux !amd64 // +build !linux !amd64
package docker package docker
import ( import (

View file

@ -1,3 +1,5 @@
// +build amd64
package utils package utils
import ( import (

View file

@ -1,4 +1,5 @@
// +build: !linux !amd64 // +build !linux !amd64
package utils package utils
import ( import (