Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: Refresh Docker for generating protobuf files. #2406

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

jholdstock
Copy link
Member

  • Pull base image by digest, helping to avoid supply chain attacks.
  • Use alpine base image instead of debian (245MB vs 837MB).
  • Update from golang 1.21.0 to 1.23.1.
  • Download specific version of protobuf from GitHub rather than whatever version happens to be provided by the base images package manager.

Prior to this PR the Dockerfile did not work at all and the version of protobuf provided by Debian's package manager was v21.12. For context, the most recent pb files in the repo were built with version v27.3.

@jholdstock
Copy link
Member Author

Linking to decred/dcrd#3440 as it has relevant discussion about docker image digest.

@jrick
Copy link
Member

jrick commented Sep 7, 2024

Honestly, I'd prefer to see a nix flake to pin these dependencies down for our linux (and mac) developers, but these updates look reasonable.

@jrick
Copy link
Member

jrick commented Sep 7, 2024

case in point why i think docker is trash:

on this PR:

# The image below is golang:1.23.1-alpine3.20 (linux/amd64)
...
FROM golang@sha256:7ed3ee46b57ffc90cc32b50c7d5f40b2bd452d2dc97e42d6e9da47067f266ef4

On decred/dcrd#3440:

# The image below is golang:1.23.1-alpine3.20 (linux/amd64)
...
FROM golang@sha256:436e2d978524b15498b98faa367553ba6c3655671226f500c72ceb7afb2ef0b1 AS builder

really?

- Pull base image by digest, helping to avoid supply chain attacks.
- Use alpine base image instead of debian (245MB vs 837MB).
- Update from golang 1.21.0 to 1.23.1.
- Download specific version of protobuf from GitHub rather than whatever
  version happens to be provided by the base images package manager.
@jrick jrick merged commit fe60769 into decred:master Sep 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants