Skip to content

Commit 88c8427

Browse files
hossainemruztamalsaha
authored andcommitted
Add NICE and IONICE into distroless image (#883)
1 parent f63d5c1 commit 88c8427

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Dockerfile.dbg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ COPY --from=0 restic /bin/restic
2323
COPY --from=0 restic_{NEW_RESTIC_VER} /bin/restic_{NEW_RESTIC_VER}
2424
COPY bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}
2525

26+
# Copy "nice" and "ionice".
27+
COPY --from=0 /usr/bin/nice /bin/nice
28+
COPY --from=0 /usr/bin/ionice /bin/ionice
29+
2630
ENTRYPOINT ["/{ARG_BIN}"]

Dockerfile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ COPY --from=0 /restic /bin/restic
2323
COPY --from=0 /restic_{NEW_RESTIC_VER} /bin/restic_{NEW_RESTIC_VER}
2424
COPY bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}
2525

26+
# Copy "nice" and "ionice".
27+
COPY --from=0 /usr/bin/nice /bin/nice
28+
COPY --from=0 /usr/bin/ionice /bin/ionice
29+
2630
# This would be nicer as `nobody:nobody` but distroless has no such entries.
2731
USER 65535:65535
2832

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS) windows/amd64 darwin/amd64
6060
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
6161
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
6262

63-
BASEIMAGE_PROD ?= gcr.io/distroless/static
63+
BASEIMAGE_PROD ?= gcr.io/distroless/base
6464
BASEIMAGE_DBG ?= debian:stretch
6565

6666
IMAGE := $(REGISTRY)/$(BIN)

0 commit comments

Comments
 (0)