Skip to content

Commit

Permalink
Merge pull request vmware-tanzu#129 from timothysc/target-update
Browse files Browse the repository at this point in the history
Update targets and images to use our internal golang 1.9 images
Signed-off-by: Jesse Hamilton [email protected]

Signed-off-by: Jesse Hamilton [email protected]
  • Loading branch information
timothysc authored Nov 6, 2017
2 parents 2615aec + 7fc48fd commit 0cc6060
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM buildpack-deps:jessie-scm
FROM gcr.io/heptio-images/golang:1.9-alpine3.6
MAINTAINER Timothy St. Clair "[email protected]"

RUN apt-get update && apt-get -y --no-install-recommends install \
ca-certificates \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/lib/apt/lists/*
ADD sonobuoy /sonobuoy
RUN apk add --no-cache ca-certificates
ADD sonobuoy /sonobuoy
ADD scripts/run_master.sh /run_master.sh
#USER nobody:nobody
# TODO - Verify execution is fine as nobody user to drop privs
# USER nobody:nobody

CMD ["/bin/sh", "-c", "/run_master.sh"]
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ IMAGE_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD | sed 's/\///g')
GIT_REF = $(shell git rev-parse --short=8 --verify HEAD)

BUILDMNT = /go/src/$(GOTARGET)
BUILD_IMAGE ?= golang:1.8
BUILD_IMAGE ?= gcr.io/heptio-images/golang:1.9-alpine3.6
BUILDCMD = go build -o $(TARGET) -v -ldflags "-X github.com/heptio/sonobuoy/pkg/buildinfo.Version=$(GIT_VERSION) -X github.com/heptio/sonobuoy/pkg/buildinfo.DockerImage=$(REGISTRY)/$(TARGET):$(GIT_REF)"
BUILD = $(BUILDCMD) $(GOTARGET)/cmd/sonobuoy

Expand All @@ -44,16 +44,15 @@ TEST = go test $(TEST_PKGS) $(TESTARGS)
VET = go vet $(TEST_PKGS)

# Vendor this someday
INSTALL_GOLINT = go get -u github.com/golang/lint/golint
GOLINT_FLAGS ?= -set_exit_status
LINT = $(INSTALL_GOLINT) && golint $(GOLINT_FLAGS) $(TEST_PKGS)
LINT = golint $(GOLINT_FLAGS) $(TEST_PKGS)

WORKDIR ?= /sonobuoy
RBAC_ENABLED ?= 1
KUBECFG_CMD = $(DOCKER) run \
-v $(DIR):$(WORKDIR) \
--workdir $(WORKDIR) \
- --rm \
--rm \
$(KSONNET_BUILD_IMAGE) \
kubecfg show -o yaml -V RBAC_ENABLED=$(RBAC_ENABLED) -J $(WORKDIR) -o yaml $< > $@

Expand Down

0 comments on commit 0cc6060

Please sign in to comment.