Add Dockerfile and Makefile
This commit is contained in:
parent
d9917ab8b0
commit
a8c39d066b
3 changed files with 28 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
.git
|
17
Dockerfile
Normal file
17
Dockerfile
Normal 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
10
Makefile
Normal 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}"
|
Loading…
Reference in a new issue