Skip to content

Commit a124b68

Browse files
committed
Minor cleanup/consistency changes for linter imgs
- remove old/unused commented out blocks - rearrange ENV var placements - update stable/unstable images to echo tool/module versions after installing in builder stage
1 parent 15ff8b8 commit a124b68

File tree

3 files changed

+71
-55
lines changed

3 files changed

+71
-55
lines changed

oldstable/combined/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ ENV TOMLL_VERSION="v2.2.2"
136136
ENV ERRWRAP_VERSION="v1.6.0"
137137
ENV GOTESTDOX_VERSION="v0.2.2"
138138

139-
ENV APT_BSDMAINUTILS_VERSION="12.1.8"
140-
ENV APT_TREE_VERSION="2.1.0-1"
141-
ENV APT_FILE_VERSION="1:5.44-3"
142-
143139
# These commits/versions are provided by temporary forks of the upstream
144140
# projects. The plan is to switch back to current upstream vesions once
145141
# the required dependencies are updated for those upstream projects.
@@ -148,6 +144,10 @@ ENV STRUCTSLOP_VERSION="33c868804e9e6070fdaee64b729d3129bbe85a53"
148144
ENV TICKERYZER_VERSION="b38acaa6d76d30629a49ad9eddd1aa5ddd0afa8f"
149145
# ENV ERRWRAP_VERSION="c75521dd38c3bf43d1acaf3f628d87252fa69270"
150146

147+
ENV APT_BSDMAINUTILS_VERSION="12.1.8"
148+
ENV APT_TREE_VERSION="2.1.0-1"
149+
ENV APT_FILE_VERSION="1:5.44-3"
150+
151151
RUN apt-get update \
152152
&& apt-get install -y --no-install-recommends \
153153
bsdmainutils=${APT_BSDMAINUTILS_VERSION} \

stable/combined/Dockerfile

+42-26
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ FROM amd64/golang:1.23.0-bookworm as builder
1515
# https://github.com/atc0005/go-ci/issues/1188
1616
ENV GOTOOLCHAIN="local"
1717

18+
# A current dev branch build (mirrored to fork) is used for pre-release Go
19+
# versions, otherwise the latest upstream build of the tool is installed in
20+
# this image.
21+
# ENV GOLANGCI_LINT_VERSION="FORK-go1.23-support-2024-07-31"
22+
23+
# Latest upstream
1824
ENV GOLANGCI_LINT_VERSION="v1.60.1"
25+
1926
ENV STATICCHECK_VERSION="v0.5.1"
2027
ENV DEADCODE_VERSION="v0.24.0"
2128
ENV GOVULNCHECK_VERSION="v1.1.3"
@@ -34,40 +41,36 @@ ENV STRUCTSLOP_VERSION="33c868804e9e6070fdaee64b729d3129bbe85a53"
3441
ENV TICKERYZER_VERSION="b38acaa6d76d30629a49ad9eddd1aa5ddd0afa8f"
3542
# ENV ERRWRAP_VERSION="c75521dd38c3bf43d1acaf3f628d87252fa69270"
3643

37-
ENV APT_BSDMAINUTILS_VERSION="12.1.8"
38-
ENV APT_TREE_VERSION="2.1.0-1"
39-
4044
RUN echo "Installing staticcheck@${STATICCHECK_VERSION}" \
4145
&& go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION} \
4246
&& staticcheck --version
4347

44-
# RUN echo "Installing govulncheck@${GOVULNCHECK_VERSION}" \
45-
# && go install golang.org/x/vuln/cmd/govulncheck@${GOVULNCHECK_VERSION} \
46-
# && echo "Installing httperroryzer@${HTTPERRORYZER_VERSION}" \
47-
# && go install github.com/orijtech/httperroryzer/cmd/httperroryzer@${HTTPERRORYZER_VERSION} \
48-
# && echo "Installing structslop@${STRUCTSLOP_VERSION}" \
49-
# && go install github.com/orijtech/structslop/cmd/structslop@${STRUCTSLOP_VERSION} \
50-
# && echo "Installing tickeryzer@${TICKERYZER_VERSION}" \
51-
# && go install github.com/orijtech/tickeryzer/cmd/tickeryzer@${TICKERYZER_VERSION} \
52-
# && echo "Installing tomll@${TOMLL_VERSION}" \
53-
# && go install github.com/pelletier/go-toml/v2/cmd/tomll@${TOMLL_VERSION} \
54-
# && echo "Installing errwrap@${ERRWRAP_VERSION}" \
55-
# && go install github.com/fatih/errwrap@${ERRWRAP_VERSION}
48+
RUN echo "Installing staticcheck@${STATICCHECK_VERSION}" \
49+
&& go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION} \
50+
&& staticcheck --version
5651

5752
RUN echo "Installing govulncheck@${GOVULNCHECK_VERSION}" \
5853
&& go install golang.org/x/vuln/cmd/govulncheck@${GOVULNCHECK_VERSION} \
59-
&& echo "Installing deadcode@${DEADCODE_VERSION}" \
54+
&& govulncheck --version
55+
56+
RUN echo "Installing deadcode@${DEADCODE_VERSION}" \
6057
&& go install golang.org/x/tools/cmd/deadcode@${DEADCODE_VERSION} \
61-
&& echo "Installing tomll@${TOMLL_VERSION}" \
58+
&& go version -m $(which deadcode)
59+
60+
RUN echo "Installing tomll@${TOMLL_VERSION}" \
6261
&& go install github.com/pelletier/go-toml/v2/cmd/tomll@${TOMLL_VERSION} \
63-
&& echo "Installing gotestdox@${GOTESTDOX_VERSION}" \
64-
&& go install github.com/bitfield/gotestdox/cmd/gotestdox@${GOTESTDOX_VERSION}
62+
&& go version -m $(which tomll)
63+
64+
RUN echo "Installing gotestdox@${GOTESTDOX_VERSION}" \
65+
&& go install github.com/bitfield/gotestdox/cmd/gotestdox@${GOTESTDOX_VERSION} \
66+
&& go version -m $(which gotestdox)
6567

6668
RUN echo "Installing httperroryzer from temporary fork" \
6769
&& git clone https://github.com/atc0005/httperroryzer \
6870
&& cd httperroryzer \
6971
&& git checkout ${HTTPERRORYZER_VERSION} \
7072
&& go install ./cmd/httperroryzer \
73+
&& go version -m $(which httperroryzer) \
7174
&& cd ..
7275

7376
# https://github.com/orijtech/structslop/issues/64
@@ -76,17 +79,20 @@ RUN echo "Installing structslop from temporary fork" \
7679
&& cd structslop \
7780
&& git checkout ${STRUCTSLOP_VERSION} \
7881
&& go install -ldflags=-checklinkname=0 ./cmd/structslop \
82+
&& go version -m $(which structslop) \
7983
&& cd ..
8084

8185
RUN echo "Installing tickeryzer from temporary fork" \
8286
&& git clone https://github.com/atc0005/tickeryzer \
8387
&& cd tickeryzer \
8488
&& git checkout ${TICKERYZER_VERSION} \
8589
&& go install ./cmd/tickeryzer \
90+
&& go version -m $(which tickeryzer) \
8691
&& cd ..
8792

8893
RUN echo "Installing errwrap@${ERRWRAP_VERSION}" \
89-
&& go install github.com/fatih/errwrap@${ERRWRAP_VERSION}
94+
&& go install github.com/fatih/errwrap@${ERRWRAP_VERSION} \
95+
&& go version -m $(which errwrap)
9096

9197
# RUN echo "Installing errwrap from temporary fork" \
9298
# && git clone https://github.com/atc0005/errwrap \
@@ -127,15 +133,17 @@ LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"
127133
# https://github.com/atc0005/go-ci/issues/1188
128134
ENV GOTOOLCHAIN="local"
129135

130-
# These commits/versions are provided by temporary forks of the upstream
131-
# projects. The plan is to switch back to current upstream vesions once
132-
# the required dependencies are updated for those upstream projects.
133-
ENV HTTPERRORYZER_VERSION="9f94717820d4a5075117680de2ca07875d32c9f1"
134-
ENV STRUCTSLOP_VERSION="33c868804e9e6070fdaee64b729d3129bbe85a53"
135-
ENV TICKERYZER_VERSION="b38acaa6d76d30629a49ad9eddd1aa5ddd0afa8f"
136+
# A current dev branch build (mirrored to fork) is used for pre-release Go
137+
# versions, otherwise the latest upstream build of the tool is installed in
138+
# this image.
139+
# ENV GOLANGCI_LINT_VERSION="FORK-go1.23-support-2024-07-31"
136140

141+
# Latest upstream
137142
ENV GOLANGCI_LINT_VERSION="v1.60.1"
143+
144+
# ENV STATICCHECK_VERSION="dec278f2f0d94b07c04db075d807e9f499f5d7b5"
138145
ENV STATICCHECK_VERSION="v0.5.1"
146+
139147
ENV DEADCODE_VERSION="v0.24.0"
140148
ENV GOVULNCHECK_VERSION="v1.1.3"
141149
# ENV HTTPERRORYZER_VERSION="v0.0.1"
@@ -145,6 +153,14 @@ ENV TOMLL_VERSION="v2.2.2"
145153
ENV ERRWRAP_VERSION="v1.6.0"
146154
ENV GOTESTDOX_VERSION="v0.2.2"
147155

156+
# These commits/versions are provided by temporary forks of the upstream
157+
# projects. The plan is to switch back to current upstream vesions once
158+
# the required dependencies are updated for those upstream projects.
159+
ENV HTTPERRORYZER_VERSION="9f94717820d4a5075117680de2ca07875d32c9f1"
160+
ENV STRUCTSLOP_VERSION="33c868804e9e6070fdaee64b729d3129bbe85a53"
161+
ENV TICKERYZER_VERSION="b38acaa6d76d30629a49ad9eddd1aa5ddd0afa8f"
162+
# ENV ERRWRAP_VERSION="c75521dd38c3bf43d1acaf3f628d87252fa69270"
163+
148164
ENV APT_BSDMAINUTILS_VERSION="12.1.8"
149165
ENV APT_TREE_VERSION="2.1.0-1"
150166
ENV APT_FILE_VERSION="1:5.44-3"

unstable/combined/Dockerfile

+25-25
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,21 @@ RUN echo "Installing staticcheck@${STATICCHECK_VERSION}" \
4949
&& go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION} \
5050
&& staticcheck --version
5151

52-
# RUN echo "Installing govulncheck@${GOVULNCHECK_VERSION}" \
53-
# && go install golang.org/x/vuln/cmd/govulncheck@${GOVULNCHECK_VERSION} \
54-
# && echo "Installing httperroryzer@${HTTPERRORYZER_VERSION}" \
55-
# && go install github.com/orijtech/httperroryzer/cmd/httperroryzer@${HTTPERRORYZER_VERSION} \
56-
# && echo "Installing structslop@${STRUCTSLOP_VERSION}" \
57-
# && go install github.com/orijtech/structslop/cmd/structslop@${STRUCTSLOP_VERSION} \
58-
# && echo "Installing tickeryzer@${TICKERYZER_VERSION}" \
59-
# && go install github.com/orijtech/tickeryzer/cmd/tickeryzer@${TICKERYZER_VERSION} \
60-
# && echo "Installing tomll@${TOMLL_VERSION}" \
61-
# && go install github.com/pelletier/go-toml/v2/cmd/tomll@${TOMLL_VERSION} \
62-
# && echo "Installing errwrap@${ERRWRAP_VERSION}" \
63-
# && go install github.com/fatih/errwrap@${ERRWRAP_VERSION}
64-
6552
RUN echo "Installing govulncheck@${GOVULNCHECK_VERSION}" \
6653
&& go install golang.org/x/vuln/cmd/govulncheck@${GOVULNCHECK_VERSION} \
67-
&& echo "Installing tomll@${TOMLL_VERSION}" \
68-
&& go install github.com/pelletier/go-toml/v2/cmd/tomll@${TOMLL_VERSION} \
69-
&& echo "Installing deadcode@${DEADCODE_VERSION}" \
54+
&& govulncheck --version
55+
56+
RUN echo "Installing deadcode@${DEADCODE_VERSION}" \
7057
&& go install golang.org/x/tools/cmd/deadcode@${DEADCODE_VERSION} \
71-
&& echo "Installing gotestdox@${GOTESTDOX_VERSION}" \
72-
&& go install github.com/bitfield/gotestdox/cmd/gotestdox@${GOTESTDOX_VERSION}
58+
&& go version -m $(which deadcode)
59+
60+
RUN echo "Installing tomll@${TOMLL_VERSION}" \
61+
&& go install github.com/pelletier/go-toml/v2/cmd/tomll@${TOMLL_VERSION} \
62+
&& go version -m $(which tomll)
63+
64+
RUN echo "Installing gotestdox@${GOTESTDOX_VERSION}" \
65+
&& go install github.com/bitfield/gotestdox/cmd/gotestdox@${GOTESTDOX_VERSION} \
66+
&& go version -m $(which gotestdox)
7367

7468
RUN echo "Installing httperroryzer from temporary fork" \
7569
&& git clone https://github.com/atc0005/httperroryzer \
@@ -84,17 +78,20 @@ RUN echo "Installing structslop from temporary fork" \
8478
&& cd structslop \
8579
&& git checkout ${STRUCTSLOP_VERSION} \
8680
&& go install -ldflags=-checklinkname=0 ./cmd/structslop \
81+
&& go version -m $(which structslop) \
8782
&& cd ..
8883

8984
RUN echo "Installing tickeryzer from temporary fork" \
9085
&& git clone https://github.com/atc0005/tickeryzer \
9186
&& cd tickeryzer \
9287
&& git checkout ${TICKERYZER_VERSION} \
9388
&& go install ./cmd/tickeryzer \
89+
&& go version -m $(which tickeryzer) \
9490
&& cd ..
9591

9692
RUN echo "Installing errwrap@${ERRWRAP_VERSION}" \
97-
&& go install github.com/fatih/errwrap@${ERRWRAP_VERSION}
93+
&& go install github.com/fatih/errwrap@${ERRWRAP_VERSION} \
94+
&& go version -m $(which errwrap)
9895

9996
# RUN echo "Installing errwrap from temporary fork" \
10097
# && git clone https://github.com/atc0005/errwrap \
@@ -147,19 +144,22 @@ ENV GOLANGCI_LINT_VERSION="v1.60.1"
147144
# ENV STATICCHECK_VERSION="dec278f2f0d94b07c04db075d807e9f499f5d7b5"
148145
ENV STATICCHECK_VERSION="v0.5.1"
149146

147+
ENV DEADCODE_VERSION="v0.24.0"
148+
ENV GOVULNCHECK_VERSION="v1.1.3"
149+
# ENV HTTPERRORYZER_VERSION="v0.0.1"
150+
# ENV STRUCTSLOP_VERSION="v0.0.8"
151+
# ENV TICKERYZER_VERSION="v0.0.3"
152+
ENV TOMLL_VERSION="v2.2.2"
153+
ENV ERRWRAP_VERSION="v1.6.0"
154+
ENV GOTESTDOX_VERSION="v0.2.2"
155+
150156
# These commits/versions are provided by temporary forks of the upstream
151157
# projects. The plan is to switch back to current upstream vesions once
152158
# the required dependencies are updated for those upstream projects.
153159
ENV HTTPERRORYZER_VERSION="9f94717820d4a5075117680de2ca07875d32c9f1"
154160
ENV STRUCTSLOP_VERSION="33c868804e9e6070fdaee64b729d3129bbe85a53"
155161
ENV TICKERYZER_VERSION="b38acaa6d76d30629a49ad9eddd1aa5ddd0afa8f"
156162

157-
ENV DEADCODE_VERSION="v0.24.0"
158-
ENV GOVULNCHECK_VERSION="v1.1.3"
159-
ENV TOMLL_VERSION="v2.2.2"
160-
ENV ERRWRAP_VERSION="v1.6.0"
161-
ENV GOTESTDOX_VERSION="v0.2.2"
162-
163163
ENV APT_BSDMAINUTILS_VERSION="12.1.8"
164164
ENV APT_TREE_VERSION="2.1.0-1"
165165
ENV APT_FILE_VERSION="1:5.44-3"

0 commit comments

Comments
 (0)