File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM golang:1.12.8
2+
3+ RUN go version
4+ ENV GO111MODULE on
5+ RUN go get -u github.com/swaggo/swag/cmd/swag
6+ WORKDIR /go/src/github.com/anuvu/zot
7+ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1
Original file line number Diff line number Diff line change 11export GO111MODULE =on
22TOP_LEVEL =$(shell git rev-parse --show-toplevel)
3+ CONTAINER_RUNTIME := $(shell command -v podman 2> /dev/null || echo docker)
4+ PATH := bin:$(PATH )
35
46.PHONY : all
57all : doc binary debug test check
@@ -17,12 +19,10 @@ test:
1719 $(shell cd test/data; ./gen_certs.sh; cd ${TOP_LEVEL})
1820 go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./...
1921
20- ./bin/golangci-lint :
21- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1
22-
2322.PHONY : check
24- check : ./bin/golangci-lint
25- ./bin/golangci-lint run --enable-all ./cmd/... ./pkg/...
23+ check :
24+ golangci-lint --version || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1
25+ golangci-lint run --enable-all ./cmd/... ./pkg/...
2626
2727.PHONY : doc
2828doc :
3636.PHONY : run
3737run : binary test
3838 ./bin/zot serve examples/config-test.json
39+
40+ .PHONY : binary-container
41+ binary-container :
42+ ${CONTAINER_RUNTIME} build ${BUILD_ARGS} -f Dockerfile -t zot:latest .
43+ ${CONTAINER_RUNTIME} run --rm --security-opt label=disable -v $$(pwd ) :/go/src/github.com/anuvu/zot \
44+ zot:latest make
Original file line number Diff line number Diff line change 99* * Basic* and TLS mutual authentication
1010* Swagger based documentation
1111
12+ # Building
13+
14+ * Build inside a container (preferred)
15+
16+ ```
17+ make binary-container
18+ ```
19+
20+ * Build using host's toolchain
21+
22+ ```
23+ make
24+
25+ ```
26+
27+ Build artifacts are in bin/
28+
29+ # Running
30+
31+ bin/zot serve _ <config >_
32+
1233# Caveats
1334
1435* go 1.12+
You can’t perform that action at this time.
0 commit comments