Skip to content

Commit

Permalink
docker: add Dockerfile for building a checkup docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
titpetric committed Apr 3, 2020
1 parent ae9ad7b commit ed3a263
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.13-alpine as builder

ENV CGO_ENABLED=0

COPY . /app
WORKDIR /app
RUN apk --no-cache add make && make build

FROM alpine:latest

WORKDIR /app

COPY --from=builder /app/builds/checkup /usr/local/bin/checkup

ENTRYPOINT ["checkup"]
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.PHONY: all build test docker

all: build test docker
all: build test

DOCKER_IMAGE := checkup

build:
mkdir -p builds/
Expand All @@ -10,4 +12,4 @@ test:
go test -race -count=1 -v ./...

docker:
docker build --no-cache . -t checkup
docker build --no-cache . -t $(DOCKER_IMAGE)

0 comments on commit ed3a263

Please sign in to comment.