-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds flag to upload to build binary statically. Updates golang/go#17891 Change-Id: If19b2e2cf9a84fa2b4cc6fdf55d8add5b54abff7 Reviewed-on: https://go-review.googlesource.com/33890 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
- Loading branch information
Showing
6 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2017 The Go Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
# Alpine Linux builder | ||
# Docker tag gcr.io/go-dashboard-dev/linux-x86-alpine (staging) | ||
# and gcr.io/symbolic-datum-552/linux-x86-alpine (prod) | ||
|
||
FROM alpine:3.5 | ||
MAINTAINER golang-dev <golang-dev@googlegroups.com> | ||
|
||
RUN apk add --no-cache \ | ||
bash \ | ||
binutils \ | ||
build-base \ | ||
ca-certificates \ | ||
curl \ | ||
gcc \ | ||
gdb \ | ||
gfortran \ | ||
git \ | ||
go \ | ||
libc-dev \ | ||
lsof \ | ||
procps \ | ||
strace | ||
|
||
RUN curl -o /usr/local/bin/stage0 https://storage.googleapis.com/go-builder-data/buildlet-stage0.linux-amd64-static | ||
RUN chmod +x /usr/local/bin/stage0 | ||
|
||
ENV GOROOT_BOOTSTRAP=/usr/lib/go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2017 The Go Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
IMAGE_NAME=$(shell basename $(CURDIR)) | ||
STAGING_REPO=gcr.io/go-dashboard-dev | ||
PROD_REPO=gcr.io/symbolic-datum-552 | ||
|
||
usage: | ||
echo "Use staging, prod, or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1 | ||
|
||
staging: Dockerfile | ||
docker build -t $(STAGING_REPO)/$(IMAGE_NAME):latest . | ||
gcloud docker push $(STAGING_REPO)/$(IMAGE_NAME):latest | ||
|
||
prod: Dockerfile | ||
docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest . | ||
gcloud docker push $(PROD_REPO)/$(IMAGE_NAME):latest | ||
|
||
# You must provide a REPO=your-repo-name arg when you make | ||
# this targarget. REPO is the name of the Docker repository | ||
# that will be prefixed to the name of the image being built. | ||
dev: Dockerfile | ||
docker build -t $(REPO)/$(IMAGE_NAME):latest . | ||
gcloud docker push $(REPO)/$(IMAGE_NAME):latest |