Skip to content

Commit 78a28ca

Browse files
committed
Use debian-base as base image
All of the main Kubernetes components are switching to it, since we can maintain it more easily.
1 parent 7bb3262 commit 78a28ca

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

Dockerfile.in

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ MAINTAINER Tim Hockin <[email protected]>
1818

1919
ADD bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}
2020

21-
RUN apk update --no-cache && apk add \
22-
ca-certificates \
23-
coreutils \
24-
git \
25-
openssh-client
21+
RUN apt-get update \
22+
&& apt-get -y install \
23+
ca-certificates \
24+
coreutils \
25+
git \
26+
openssh-client \
27+
&& rm -rf /var/lib/apt/lists/*
2628

2729
RUN echo "git-sync:x:65533:65533::/tmp:/sbin/nologin" >> /etc/passwd
2830

2931
WORKDIR /tmp
30-
USER git-sync:nobody
32+
USER git-sync:nogroup
3133
ENTRYPOINT ["/{ARG_BIN}"]

Makefile

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,13 @@ VERSION := $(shell git describe --tags --always --dirty)
3333

3434
SRC_DIRS := cmd pkg # directories which hold app source (not vendored)
3535

36-
ALL_PLATFORMS := linux/amd64
36+
ALL_PLATFORMS := linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/s390x
3737

3838
# Used internally. Users should pass GOOS and/or GOARCH.
3939
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
4040
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
4141

42-
# TODO: get a baseimage that works for other platforms
43-
# linux/arm linux/arm64 linux/ppc64le
44-
45-
# Set default base image dynamically for each arch
46-
ifeq ($(OS)/$(ARCH),linux/amd64)
47-
BASEIMAGE ?= alpine:3.8
48-
#else ifeq ($(OS)/$(ARCH),linux/arm)
49-
# BASEIMAGE ?= armel/busybox
50-
#else ifeq ($(OS)/$(ARCH),linux/arm64)
51-
# BASEIMAGE ?= aarch64/busybox
52-
#else ifeq ($(OS)/$(ARCH),linux/ppc64le)
53-
# BASEIMAGE ?= ppc64le/busybox
54-
else
55-
$(error Unsupported target platform '$(OS)/$(ARCH)')
56-
endif
42+
BASEIMAGE ?= k8s.gcr.io/debian-base:0.4.1
5743

5844
IMAGE := $(REGISTRY)/$(BIN)
5945
TAG := $(VERSION)__$(OS)_$(ARCH)

0 commit comments

Comments
 (0)