Skip to content
This repository was archived by the owner on Dec 1, 2018. It is now read-only.

Commit fd216f1

Browse files
authored
Merge pull request #1514 from timstclair/scratch
Rebase heapster image on scratch & don't run as root
2 parents fc99b06 + 45411e0 commit fd216f1

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

Makefile

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,6 @@ TEST_NAMESPACE=heapster-e2e-tests
3939

4040
HEAPSTER_LDFLAGS=-w -X k8s.io/heapster/version.HeapsterVersion=$(VERSION) -X k8s.io/heapster/version.GitCommit=$(GIT_COMMIT)
4141

42-
ifeq ($(ARCH),amd64)
43-
BASEIMAGE?=busybox
44-
endif
45-
ifeq ($(ARCH),arm)
46-
BASEIMAGE?=armhf/busybox
47-
endif
48-
ifeq ($(ARCH),arm64)
49-
BASEIMAGE?=aarch64/busybox
50-
endif
51-
ifeq ($(ARCH),ppc64le)
52-
BASEIMAGE?=ppc64le/busybox
53-
endif
54-
ifeq ($(ARCH),s390x)
55-
BASEIMAGE?=s390x/busybox
56-
endif
57-
5842
fmt:
5943
find . -type f -name "*.go" | grep -v "./vendor*" | xargs gofmt -s -w
6044

@@ -89,8 +73,6 @@ container:
8973
&& GOARCH=$(ARCH) CGO_ENABLED=0 go build -ldflags \"$(HEAPSTER_LDFLAGS)\" -o /build/eventer k8s.io/heapster/events"
9074

9175
cp deploy/docker/Dockerfile $(TEMP_DIR)
92-
cd $(TEMP_DIR) && sed -i -e "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile
93-
9476
docker build --pull -t $(PREFIX)/heapster-$(ARCH):$(VERSION) $(TEMP_DIR)
9577
ifneq ($(OVERRIDE_IMAGE_NAME),)
9678
docker tag -f $(PREFIX)/heapster-$(ARCH):$(VERSION) $(OVERRIDE_IMAGE_NAME)

deploy/docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM BASEIMAGE
1+
FROM scratch
22

33
COPY heapster eventer /
44
COPY ca-certificates.crt /etc/ssl/certs/
55

6+
# nobody:nobody
7+
USER 65534:65534
68
ENTRYPOINT ["/heapster"]

0 commit comments

Comments
 (0)