mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Move to extras directory, add Makefile, Dockerfile
This commit is contained in:
10
extras/scanner/Dockerfile
Normal file
10
extras/scanner/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM alpine:3.8
|
||||
RUN apk add --no-cache ca-certificates
|
||||
COPY scanner /bin/scanner
|
||||
EXPOSE 6060
|
||||
ENTRYPOINT [ "/bin/scanner" ]
|
||||
|
||||
ARG revision
|
||||
LABEL org.opencontainers.image.title="scanner" \
|
||||
org.opencontainers.image.source="https://github.com/weaveworks/scope/app/multitenant/scanner" \
|
||||
org.opencontainers.image.revision="${revision}"
|
||||
24
extras/scanner/Makefile
Normal file
24
extras/scanner/Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
.PHONY: all vet lint build test clean
|
||||
GIT_REVISION := $(shell git rev-parse HEAD)
|
||||
GO_BUILD_FLAGS=$(GO_BUILD_INSTALL_DEPS) -ldflags "-extldflags \"-static\" -s -w" -tags netgo
|
||||
|
||||
all: build test vet lint
|
||||
|
||||
vet:
|
||||
go vet ./...
|
||||
|
||||
lint:
|
||||
golint .
|
||||
|
||||
build:
|
||||
go build $(GO_BUILD_FLAGS)
|
||||
|
||||
test:
|
||||
go test
|
||||
|
||||
docker:
|
||||
docker build --build-arg=revision=$(GIT_REVISION) -t quay.io/weaveworks/scope-deleter .
|
||||
|
||||
clean:
|
||||
go clean
|
||||
|
||||
Reference in New Issue
Block a user