From df800efc9078c59557ea7b1da3d0c2d66d206e8d Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Tue, 26 Jul 2022 10:40:45 -0500 Subject: [PATCH] add Dockerfile and Makefile --- Dockerfile | 7 +++++++ Makefile | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 Dockerfile create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9c64030 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM golang:latest AS build +WORKDIR /src +COPY . . +RUN CGO_ENABLED=0 go build ./cmd/bb + +FROM scratch AS bin +COPY --from=build /src/bb / \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..48c239d --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +.PHONY: build +build: + DOCKER_BUILDKIT=1 + docker build --target bin --output bin/ . + +.PHONY: clean +clean: + rm bin/bb \ No newline at end of file