-
Notifications
You must be signed in to change notification settings - Fork 345
Adding precautionary check for DockerHub registry availability in dev container cli #1113
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
base: main
Are you sure you want to change the base?
Adding precautionary check for DockerHub registry availability in dev container cli #1113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I'm happy with this, if we've done sufficient testing
We could have made a general utility function in utils.ts to check the dockerhub auth/ registry access status, and placed the image name/version as variables, but i'm happy with this, can extend this in future if we need.
question: What testing have you done here? Can you update the PR description to state this?
Co-authored-by: Sam Byng <sam-byng@github.com>
sam-byng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - looks better now ✅
Ref: https://github.com/github/codespaces/issues/22031
Description of changes:
# syntax=docker/dockerfile:1.4which forces devcontainer cli to downloaddocker/dockerfile:1.4parser image from DockerHub registry. This change was added in PR with #syntax directives + buildkit + user namespace remapping by auto-injecting the #syntax directive in dev container build. This is not required for docker engine version v23 onwards as the default moby buildkit version includesdocker/dockerfile:1.4or higher version of the parser. As part of this PR adding precautionary check to call DockerHub registry URL and confirm the availability before auto-injecting the #syntax directive.Changelog:
src/spec-node/utils.tsby changing the faulty error logging in retry function.src/spec-node/containerFeatures.tsfile.Checklist: