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

docker: Update image to golang:1.22.2-alpine3.19. #3231

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Apr 4, 2024

This updates the docker image to golang:1.22.2-alpine3.19.

To confirm the new digest:

$ docker pull golang:1.22.2-alpine3.19
1.22.2-alpine3.19: Pulling from library/golang
...
Digest: sha256:cdc86d9f363e8786845bea2040312b4efa321b828acdeb26f393faa864d887b0
...

@davecgh davecgh added this to the 1.9.0 milestone Apr 4, 2024
Copy link

@ukane-philemon ukane-philemon left a comment

Choose a reason for hiding this comment

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

LGTM

% docker pull golang:1.22.2-alpine3.19
1.22.2-alpine3.19: Pulling from library/golang
4abcf2066143: Already exists 
e2ea43e27ed4: Pull complete 
5d1e5825012b: Pull complete 
bd8a78f8bd68: Pull complete 
4f4fb700ef54: Pull complete 
Digest: sha256:cdc86d9f363e8786845bea2040312b4efa321b828acdeb26f393faa864d887b0
Status: Downloaded newer image for golang:1.22.2-alpine3.19
docker.io/library/golang:1.22.2-alpine3.19

This updates the docker image to golang:1.22.2-alpine3.19.

To confirm the new digest:

```
$ docker pull golang:1.22.2-alpine3.19
1.22.2-alpine3.19: Pulling from library/golang
...
Digest: sha256:cdc86d9f363e8786845bea2040312b4efa321b828acdeb26f393faa864d887b0
...
```
@davecgh davecgh force-pushed the contrib_docker_go1_22_2 branch from de75f2d to 3db897e Compare April 4, 2024 15:59
@davecgh davecgh merged commit 3db897e into decred:master Apr 4, 2024
2 checks passed
@davecgh davecgh deleted the contrib_docker_go1_22_2 branch April 4, 2024 16:01
@matthawkins90
Copy link
Contributor

matthawkins90 commented Apr 4, 2024

Just FYI, I'm experimenting with Podman because I just discovered that it's "generally" more secure than Docker because Podman runs without a daemon and rootless by default.

I tried podman pull golang:1.22.2-alpine3.19 and got:

✔ docker.io/library/golang:1.22.2-alpine3.19
Trying to pull docker.io/library/golang:1.22.2-alpine3.19...
Getting image source signatures
Copying blob 4f4fb700ef54 done   |
Copying blob e2ea43e27ed4 done   |
Copying blob 5d1e5825012b done   |
Copying blob 4abcf2066143 done   |
Copying blob bd8a78f8bd68 done   |
Copying config 438d618745 done   |
Writing manifest to image destination
438d61874560e498caa4b03bc1727e96900b31e4e9d0294429a25002eb21deae

So it seems like the source is the same docker.io/library/golang, but the final image hash looks different.

The blob hashes look identical to what @ukane-philemon posted, though. The only difference is the copying config 438d6187...

@matthawkins90
Copy link
Contributor

Ah, I figured it out. Running podman image inspect <image_id> yields a config file that contains the digest hash:

"Id": "438d61874560e498caa4b03bc1727e96900b31e4e9d0294429a25002eb21deae",
"Digest": "sha256:cdc86d9f363e8786845bea2040312b4efa321b828acdeb26f393faa864d887b0",
"RepoTags": [
     "docker.io/library/golang:1.22.2-alpine3.19"
],
"RepoDigests": [
     "docker.io/library/golang@sha256:963da5f97ab931c0df6906e8c0ebc7db28c88d013735ae020f9558c3e6cf0580",
     "docker.io/library/golang@sha256:cdc86d9f363e8786845bea2040312b4efa321b828acdeb26f393faa864d887b0"
],
"Parent": "",
"Comment": "",
"Created": "2024-04-03T16:03:48Z"

@davecgh
Copy link
Member Author

davecgh commented Apr 4, 2024

Also, for reference, that 438d61874560e498caa4b03bc1727e96900b31e4e9d0294429a25002eb21deae is the image ID as opposed to the digest. The digest is a hash of the manifest introduced in the Docker registry v2. The image ID is a hash of the local image JSON configuration.

$ docker image ls | grep 1.22.2
golang                     1.22.2-alpine3.19   438d61874560   25 hours ago    230MB
$ docker image inspect 438d61874560 | jq '.[0] | {Id,RepoDigests}'
{
  "Id": "sha256:438d61874560e498caa4b03bc1727e96900b31e4e9d0294429a25002eb21deae",
  "RepoDigests": [
    "golang@sha256:cdc86d9f363e8786845bea2040312b4efa321b828acdeb26f393faa864d887b0"
  ]
}

It looks like podman pull displays the image ID whereas docker pull shows the digest.

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.

4 participants