add Dockerfile and Makefile

This commit is contained in:
Ryan Cavicchioni 2022-07-26 10:40:45 -05:00
parent fde1097851
commit df800efc90
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
2 changed files with 15 additions and 0 deletions

7
Dockerfile Normal file
View File

@ -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 /

8
Makefile Normal file
View File

@ -0,0 +1,8 @@
.PHONY: build
build:
DOCKER_BUILDKIT=1
docker build --target bin --output bin/ .
.PHONY: clean
clean:
rm bin/bb