New target in Makefile, changed Dockerfile
This commit is contained in:
parent
079214702a
commit
4634dfba50
|
@ -1,10 +1,11 @@
|
|||
FROM golang:1.14 AS builder
|
||||
ARG version=dev
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum /app/
|
||||
RUN go mod download
|
||||
COPY *go /app/
|
||||
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -tags netgo -o /sendmail ./...
|
||||
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s -X main.version=${version}" -tags netgo -o /sendmail ./...
|
||||
|
||||
FROM busybox:latest AS shell
|
||||
|
||||
|
|
7
Makefile
7
Makefile
|
@ -17,6 +17,9 @@ clean:
|
|||
|
||||
build: clean output/sendmail
|
||||
|
||||
docker-build:
|
||||
docker build --build-arg=version=$(VERSION) -t leophys/mailer:$(VERSION) .
|
||||
|
||||
dev-build: clean output/sendmail-dev
|
||||
|
||||
bumpvers-minor:
|
||||
|
@ -34,9 +37,11 @@ bumpvers-major:
|
|||
release-min:
|
||||
make bumpvers-minor
|
||||
make build
|
||||
make docker-build
|
||||
|
||||
release-maj:
|
||||
make bumpvers-major
|
||||
make build
|
||||
make docker-build
|
||||
|
||||
PHONY: bumpvers-minor bumpvers-major release-min release-maj clean
|
||||
PHONY: bumpvers-minor bumpvers-major release-min release-maj clean docker-build
|
||||
|
|
Loading…
Reference in New Issue
Block a user