From 1d68509463124138f04ea736dd3aa75c1e47f574 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 14 Jan 2022 09:19:16 +0100 Subject: [PATCH] Strip binary, update to go-1.17.6 --- Dockerfile | 3 ++- Dockerfile.alpine | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d344268..d5fe3421 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Builder image -FROM golang:1.17.1-bullseye AS build +FROM golang:1.17.6-bullseye AS build ENV GOPATH /go WORKDIR /go/src/headscale @@ -9,6 +9,7 @@ RUN go mod download COPY . . RUN go install -a -ldflags="-extldflags=-static" -tags netgo,sqlite_omit_load_extension ./cmd/headscale +RUN strip /go/bin/headscale RUN test -e /go/bin/headscale # Production image diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 7d90e1ec..8185dbe4 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,5 +1,5 @@ # Builder image -FROM golang:1.17.1-alpine AS build +FROM golang:1.17.6-alpine AS build ENV GOPATH /go WORKDIR /go/src/headscale @@ -10,6 +10,7 @@ RUN go mod download COPY . . RUN go install -a -ldflags="-extldflags=-static" -tags netgo,sqlite_omit_load_extension ./cmd/headscale +RUN strip /go/bin/headscale RUN test -e /go/bin/headscale # Production image