Skip to content

Conversation

ldez
Copy link
Member

@ldez ldez commented Feb 9, 2024

Ends with the problem of the usage of different binaries between Docker images and the pre-compiled binaries.

To try the PR:

build

goreleaser release --skip=publish --skip=validate --clean --snapshot

To build quickly, I recommend modifying the .goreleaser.yml file:

#...

builds:
  - binary: golangci-lint
    goos:
#      - darwin
#      - windows
      - linux
#      - freebsd
#      - netbsd
#      - illumos
    goarch:
      - amd64
      - arm64
#      - arm
#      - 386
#      - ppc64le
#      - s390x
#      - mips64
#      - mips64le
#      - riscv64
#      - loong64

#...

run

docker run --rm golangci/golangci-lint:latest-amd64 golangci-lint version

or if you are on linux/arm64

docker run --rm golangci/golangci-lint:latest-arm64 golangci-lint version

labels

docker inspect golangci/golangci-lint:latest-amd64

or if you are on linux/arm64

docker inspect golangci/golangci-lint:latest-arm64

More

If you want an "in production" example, I already did that on several projects, you can show this example:

Note: images will be available with the same tags as before, the PR just adds new tags and arch.
https://hub.docker.com/r/golangci/golangci-lint/tags

Fixes #4368
Closes #4369

@ldez ldez added enhancement New feature or improvement area: ci PR that update CI docker PR that update Docker code labels Feb 9, 2024
@ldez ldez requested review from Antonboom and bombsimon February 9, 2024 02:43
Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez merged commit dcddbda into golangci:master Feb 9, 2024
@ldez ldez deleted the feat/release-docker-goreleaser branch February 9, 2024 14:14
@ldez ldez modified the milestone: v1.56 Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci PR that update CI docker PR that update Docker code enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version missing from golangci-lint in Docker image since v1.56.0

3 participants