From e3b141389bdfa101230fc83adbfd7eb24f43376f Mon Sep 17 00:00:00 2001
From: x70b1 <10016267+x70b1@users.noreply.github.com>
Date: Thu, 13 Oct 2022 00:13:45 +0200
Subject: [PATCH] update golang, replace CMD

---
 Dockerfile | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 5f38b95..b9828c1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,13 +1,18 @@
 # syntax = docker/dockerfile:1.3
-FROM golang:1.18
+# Golang
+FROM golang:1.19 as build
 
 WORKDIR /go/src/github.com/mccutchen/go-httpbin
 
 COPY . .
+
 RUN --mount=type=cache,id=gobuild,target=/root/.cache/go-build \
     make build buildtests
 
+# distroless
 FROM gcr.io/distroless/base
-COPY --from=0 /go/src/github.com/mccutchen/go-httpbin/dist/go-httpbin* /bin/
+
+COPY --from=build /go/src/github.com/mccutchen/go-httpbin/dist/go-httpbin* /bin/
+
 EXPOSE 8080
-CMD ["/bin/go-httpbin"]
+ENTRYPOINT ["/bin/go-httpbin"]
-- 
GitLab