File tree 3 files changed +15
-18
lines changed 3 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -11,4 +11,9 @@ WORKDIR /workdir
11
11
12
12
RUN go build -o main
13
13
14
- ENTRYPOINT ["/workdir/main" ]
14
+ RUN go install github.com/golangci/golangci-lint/cmd/
[email protected]
15
+ RUN golangci-lint --version
16
+
17
+ RUN golangci-lint run || echo "Linter failed"
18
+
19
+ ENTRYPOINT ["/workdir/main" ]
Original file line number Diff line number Diff line change 1
1
.PHONY : build
2
2
build :
3
- DOCKER_BUILDKIT=1 docker build -t main .
3
+ docker build -t main .
4
4
5
5
.PHONY : run
6
6
run : build
7
7
docker run main
8
-
9
- .PHONY : lint-v1.43
10
- lint-v1.43 :
11
- @docker run --rm -it \
12
- -v $$(pwd ) :/app \
13
- -w /app \
14
- golangci/golangci-lint:v1.43-alpine \
15
- sh -c " golangci-lint run" || echo " Linter failed"
16
-
17
- .PHONY : lint-v1.44
18
- lint-v1.44 :
19
- @docker run --rm -it \
20
- -v $$(pwd ) :/app \
21
- -w /app \
22
- golangci/golangci-lint:v1.44-alpine \
23
- sh -c " golangci-lint run" || echo " Linter failed"
Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ $ make run
12
12
13
13
## Reproducing the Error
14
14
15
+ UPDATE: The problem is because this example relies on a library that uses CGO
16
+ to wrap the Proj library.
17
+ As the library was not installed locally, the export files weren't generated
18
+ by the GC compiler.
19
+ I've since modified the Dockerfile to install golangci-lint v1.50.1 and ran
20
+ golangci-lint within the container itself and the error no longer appears.
21
+
22
+
15
23
``` shell
16
24
$ golangci-lint --version
17
25
golangci-lint has version 1.50.1 built from 8926a95f on 2022-10-22T10:50:47Z
You can’t perform that action at this time.
0 commit comments