This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
- ARG GO_VERSION=1.10
1
+ ARG GO_VERSION=1.10.1
2
2
ARG RUN_BASE_TAG=3.7
3
- ARG BUILD_BASE_TAG=${GO_VERSION}-alpine${RUN_BASE_TAG}
4
3
5
- FROM golang:${BUILD_BASE_TAG}
4
+ FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint-base
6
5
RUN apk add --no-cache \
7
6
curl \
8
7
git
@@ -26,4 +25,9 @@ ENV CGO_ENABLED=0
26
25
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
27
26
ENTRYPOINT ["/usr/local/bin/gometalinter"]
28
27
CMD ["--config=gometalinter.json", "./..."]
28
+
29
+ FROM lint-base AS lint-volume
29
30
VOLUME ["/go/src/github.com/docker/lunchbox"]
31
+
32
+ FROM lint-base AS lint-image
33
+ COPY . .
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ test check: lint unit-test e2e-test
51
51
52
52
lint :
53
53
@echo " Linting..."
54
- @tar -c Dockerfile.lint gometalinter.json | docker build -t $(IMAGE_NAME ) -lint $(IMAGE_BUILD_ARGS ) -f Dockerfile.lint - > /dev/null
55
- @docker run --rm -v $(dir $(realpath $(lastword $(MAKEFILE_LIST ) ) ) ) :/go/src/$(PKG_NAME ) $(IMAGE_NAME ) -lint
54
+ @tar -c Dockerfile.lint gometalinter.json | docker build -t $(IMAGE_NAME ) -lint $(IMAGE_BUILD_ARGS ) -f Dockerfile.lint - --target=lint-volume > /dev/null
55
+ @docker run --rm -v $(dir $(realpath $(lastword $(MAKEFILE_LIST ) ) ) ) :/go/src/$(PKG_NAME ) :ro $(IMAGE_NAME ) -lint
56
56
57
57
e2e-test :
58
58
@echo " Running e2e tests..."
@@ -69,9 +69,13 @@ clean:
69
69
# CI #
70
70
# #####
71
71
72
- ci-lint : lint
72
+ ci-lint :
73
+ @echo " Linting..."
74
+ docker build -t $(IMAGE_NAME ) -lint $(IMAGE_BUILD_ARGS ) -f Dockerfile.lint . --target=lint-image
75
+ docker run --rm $(IMAGE_NAME ) -lint
73
76
74
77
ci-test :
78
+ @echo " Testing..."
75
79
docker build -t $(IMAGE_NAME ) -test $(IMAGE_BUILD_ARGS ) . --target=test
76
80
77
81
ci-bin-% :
You can’t perform that action at this time.
0 commit comments