From 21ea27aa0e9e355e26e1c4dec9d60f1dadcc4d8b Mon Sep 17 00:00:00 2001 From: Sam Lin Date: Wed, 8 Feb 2023 13:16:59 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20create=20dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 15 +++++++++++++++ Makefile | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..420ea41 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM golang:alpine as build +ARG VERSION + +WORKDIR /go/src/github.com/ssllabs/ssllabs-scan +COPY . . +RUN apk add --no-cache git make && make all + +FROM alpine:latest +COPY --from=build /go/src/github.com/ssllabs/ssllabs-scan/ssllabs-scan-v3 /usr/bin/ +RUN apk update \ + && apk upgrade \ + && apk add --no-cache ca-certificates \ + && update-ca-certificates 2>/dev/null || true + +ENTRYPOINT ["ssllabs-scan-v3"] diff --git a/Makefile b/Makefile index 373339f..349766b 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,8 @@ +export GO111MODULE=on + +.PHONY: all + +all: build + build: go build ssllabs-scan-v3.go