Add Dockerfile and Makefile

This commit is contained in:
Tony Blyler 2021-05-18 21:30:23 -04:00
parent d9917ab8b0
commit a8c39d066b
Signed by: tblyler
GPG key ID: 7F13D9A60C0D678E
3 changed files with 28 additions and 0 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
.git

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM golang:1.16-alpine AS builder
COPY . /meditime
WORKDIR /meditime
RUN go build
FROM alpine:3.13
RUN apk add --no-cache \
ca-certificates \
tzdata
COPY --from=builder /meditime/meditime /usr/local/bin/meditime
ENTRYPOINT ["/usr/local/bin/meditime"]

10
Makefile Normal file
View file

@ -0,0 +1,10 @@
IMAGE_REGISTRY = registry.0xdad.com/meditime
IMAGE_TAG = latest
.PHONY: build
build:
docker build -t "${IMAGE_REGISTRY}:${IMAGE_TAG}" .
.PHONY: deploy
deploy: build
docker push "${IMAGE_REGISTRY}:${IMAGE_TAG}"