From 5a7d7046904ba9fd5c8080bee5146069e4aa9d67 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Sat, 25 Sep 2021 22:16:26 -0400 Subject: [PATCH] use bulleye from builder image --- Dockerfile | 5 +++-- Makefile | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 392ca53..a50aa6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ -FROM golang:1.17-alpine as builder +FROM golang:1.17.1-bullseye as builder COPY . /app WORKDIR /app -RUN apk add git make build-base \ +RUN apt-get update \ + && apt-get install --yes git build-essential \ && make dist FROM gcr.io/distroless/base-debian10 diff --git a/Makefile b/Makefile index 5dd310f..17e406d 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,7 @@ build: lint $(BIN) .PHONY: dist dist: $(TARGET_DIR) $(SRC) - $(GOBUILD) -o=$(BIN) -a -ldflags "-linkmode external -extldflags -static" + $(GOBUILD) -o=$(BIN) -a -trimpath -ldflags="-extldflags=-static" # docker: build the docker image