Skip to content

Commit

Permalink
Added a monday docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
eko committed Sep 15, 2019
1 parent e10af91 commit f71fea9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
@@ -0,0 +1,23 @@
FROM golang:1.13-alpine3.10 as builder

ARG Version

RUN apk --no-cache add git && \
apk --update add alpine-sdk && \
rm -rf /var/cache/apk/*

WORKDIR /sources
COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build -mod vendor -ldflags "-X main.Version=sources-$Version -s -w" -o monday /sources/cmd

FROM alpine:3.10

LABEL name="monday"
LABEL description="A dev tool for microservice developers to run local applications and/or forward others from/to Kubernetes SSH or TCP"

WORKDIR /

COPY --from=builder /sources/monday monday

ENTRYPOINT ["/monday"]
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -9,6 +9,9 @@ build: ## Builds a local version of Monday from sources
build-binary: ## Builds a single binary of Monday from sources
/usr/local/bin/go build -ldflags "-X main.Version=sources-$(shell git rev-parse --short=5 HEAD)" -o monday ./cmd

docker-build: ## Builds a docker image of Monday from sources
docker build -t monday --build-arg Version=$(shell git rev-parse --short=5 HEAD) .

generate-mocks: ## Generate mocks for tests
@echo "> generating mocks..."

Expand Down

0 comments on commit f71fea9

Please sign in to comment.