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

Build docker with go 1.19 #1231

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Build docker with go 1.19 #1231

merged 2 commits into from
Oct 9, 2023

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
2 checks passed
@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?

@@ -6,7 +6,7 @@ GIT_COMMIT=e78084afe5
EGO_PN="github.com/docker/cli"

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