Merge pull request #352 from containous/remove-alpine-from-build

Go back to standard golang image
This commit is contained in:
Vincent Demeester 2016-05-05 19:45:12 +02:00
commit f4fb2518a1
2 changed files with 10 additions and 8 deletions

View file

@ -1,8 +1,6 @@
FROM golang:1.6.1-alpine
FROM golang:1.6.2
RUN apk update && apk add git bash gcc musl-dev \
&& go get github.com/Masterminds/glide \
&& go get github.com/mitchellh/gox \
RUN go get github.com/Masterminds/glide \
&& go get github.com/jteeuwen/go-bindata/... \
&& go get github.com/golang/lint/golint \
&& go get github.com/kisielk/errcheck

View file

@ -9,13 +9,13 @@ fi
if [ -z "$1" ]; then
# Remove windows platform because of
# https://github.com/mailgun/log/issues/10
OS_PLATFORM_ARG=(-os="darwin linux")
OS_PLATFORM_ARG=(linux)
else
OS_PLATFORM_ARG=($1)
fi
if [ -z "$2" ]; then
OS_ARCH_ARG=(-arch="386 amd64 arm")
OS_ARCH_ARG=(386 amd64 arm)
else
OS_ARCH_ARG=($2)
fi
@ -32,5 +32,9 @@ fi
rm -f dist/traefik_*
# Build binaries
GOGC=off gox -ldflags "-X main.Version=$VERSION -X main.BuildDate=$DATE" "${OS_PLATFORM_ARG[@]}" "${OS_ARCH_ARG[@]}" \
-output="dist/traefik_{{.OS}}-{{.Arch}}"
for OS in ${OS_PLATFORM_ARG[@]}; do
for ARCH in ${OS_ARCH_ARG[@]}; do
echo "Building binary for $OS/$ARCH..."
GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w -X main.Version=$VERSION -X main.BuildDate=$DATE" -o "dist/traefik_$OS-$ARCH" .
done
done