Skip to content

Comments

Build docker with go 1.19#1231

Merged
jepio merged 2 commits intoflatcar-3602from
docker-go-1.19
Oct 9, 2023
Merged

Build docker with go 1.19#1231
jepio merged 2 commits intoflatcar-3602from
docker-go-1.19

Conversation

@jepio
Copy link
Member

@jepio jepio commented Oct 9, 2023

Build docker with go 1.19

Docker 20.10.24 expects to be built with go 1.19 and if it isn't certain unix level functionality is broken. We already bumped to building with go 1.19 for alpha-3619.0.0, so this change it present in beta/alpha/main.

Fixes a regression in stable flatcar/Flatcar#1203.

How to use

[ describe what reviewers need to do in order to validate this PR ]

Testing done

[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

Go 1.18 is already EOL, so no security update at all. Since
upstream docker projects already have Go 1.19, Flatcar should also have
that.

See also
https://github.com/moby/moby/blob/5d6db842238e3c4f5f9fb9ad70ea46b35227d084/Dockerfile#L6.

(cherry picked from commit 93a8983)
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Fixes: flatcar/Flatcar#1203
Copy link
Member

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

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

Thanks.

Looks good if CI passed.
Please add changelog as well.

caused by building with Go <1.19.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
@jepio
Copy link
Member Author

jepio commented Oct 9, 2023

Added a changelog and validated that:

  • docker version reports built with go 1.19.9
  • the reproducer shows 0/42 (good) instead of 0/0 (bad):
docker run --name bug-test alpine ls -l /etc/shadow
docker export bug-test | tar tv etc/shadow

@jepio jepio merged commit ff8f061 into flatcar-3602 Oct 9, 2023
@jepio jepio deleted the docker-go-1.19 branch October 9, 2023 16:08
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Build action triggered: https://github.com/flatcar/scripts/actions/runs/6467503046

@jepio
Copy link
Member Author

jepio commented Oct 9, 2023

@dongsupark: LTS will also need this soon?


COREOS_GO_PACKAGE="${EGO_PN}"
COREOS_GO_VERSION="go1.18"
COREOS_GO_VERSION="go1.19"
Copy link
Member

Choose a reason for hiding this comment

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

A fat comment here to always align this with the upstream build system would be nice

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add that to main

@dongsupark
Copy link
Member

@dongsupark: LTS will also need this soon?

No, LTS-2023 (flatcar-3510) still has Docker 20.10.23, which is still based on Go 1.18.
Only Docker 20.10.24 or newer has Go 1.19.
No need to backport.

@jepio
Copy link
Member Author

jepio commented Oct 10, 2023

@dongsupark: LTS will also need this soon?

No, LTS-2023 (flatcar-3510) still has Docker 20.10.23, which is still based on Go 1.18. Only Docker 20.10.24 or newer has Go 1.19. No need to backport.

Will LTS stay on docker 20.10.23 forever?

@dongsupark
Copy link
Member

Will LTS stay on docker 20.10.23 forever?

Usually yes, we try to not touch LTS, unless there is a serious need for another version update in LTS, like a serious bug fix.
What we are regularly doing at the moment in LTS, i.e. updates of Linux Kernel, ca-certificates, mantle containers are already a certain amount of changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants