Skip to content

Commit

Permalink
remove dockerfiles
Browse files Browse the repository at this point in the history
we don't use them, the targets in the Makefile are replaced by ones that
do not use docker
  • Loading branch information
fho committed Oct 23, 2024
1 parent 778b1b5 commit 8d002cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
build
release
vendor
registrator

dist/
14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions Dockerfile.dev

This file was deleted.

25 changes: 12 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
NAME=registrator
VERSION=$(shell cat VERSION)
DEV_RUN_OPTS ?= consul:
default: all

dev:
docker build -f Dockerfile.dev -t $(NAME):dev .
docker run --rm \
-v /var/run/docker.sock:/tmp/docker.sock \
$(NAME):dev /bin/registrator $(DEV_RUN_OPTS)
.PHONY: registrator
registrator:
CGO_ENABLED=0 go build -trimpath -o $@ *.go

build:
mkdir -p build
docker build -t $(NAME):$(VERSION) .
docker save $(NAME):$(VERSION) | gzip -9 > build/$(NAME)_$(VERSION).tgz
.PHONY: check
check:
golangci-lint run

.PHONY: test
test:
go test -race ./...

.PHONY: build dev
.PHONY: all
all: registrator check test

0 comments on commit 8d002cd

Please sign in to comment.