Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Install mount binaries in Docker images (#47)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Jun 12, 2019
1 parent 4d9ffbe commit 2d9038e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.dbg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV DEBCONF_NONINTERACTIVE_SEEN true

RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates tzdata locales \
&& apt-get install -y --no-install-recommends ca-certificates tzdata locales e2fsprogs mount \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man /tmp/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& echo 'Etc/UTC' > /etc/timezone && dpkg-reconfigure tzdata
Expand Down
10 changes: 3 additions & 7 deletions Dockerfile.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
FROM alpine as certs
RUN apk add --update ca-certificates

FROM {ARG_FROM}

COPY --from=certs /etc/ssl/certs /etc/ssl/certs
ADD bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}
RUN set -x \
&& apk add --update --no-cache ca-certificates tzdata e2fsprogs findmnt

# This would be nicer as `nobody:nobody` but distroless has no such entries.
USER 65535:65535
ADD bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}

ENTRYPOINT ["/{ARG_BIN}"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS)
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))

BASEIMAGE_PROD ?= busybox
BASEIMAGE_PROD ?= alpine:3.9
BASEIMAGE_DBG ?= debian:stretch

IMAGE := $(REGISTRY)/$(BIN)
Expand Down

0 comments on commit 2d9038e

Please sign in to comment.