From b8c10a9d589a21f250787d8d5bf6f79b97e693e0 Mon Sep 17 00:00:00 2001 From: Erik Winter Date: Wed, 31 May 2023 15:46:58 +0200 Subject: [PATCH] docker file --- Dockerfile | 11 +++++++++++ Makefile | 4 ++++ 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..3644dbb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.20-alpine as build + +WORKDIR /src +COPY . ./ +RUN go mod download +RUN go build -o /yogai ./service.go + +FROM golang:1.20-alpine + +COPY --from=build /yogai /yogai +CMD /yogai \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d82c006 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +docker-push: + docker build . -t yogai + docker tag yogai registry.ewintr.nl/yogai + docker push registry.ewintr.nl/yogai