-
Notifications
You must be signed in to change notification settings - Fork 349
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
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 <[email protected]>
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 ✅
Docker compose with dev container configuration with Dockerfile and without any feature:Dev container configuration configurations here Expected Result: API call to check the availability of dockerfile frontend image in DockerHub registry shouldn’t happen and Actual Result: As it can be seen in the below log capture from the test workflow log , neither the API call nor the API call can be seen. |
Simple Dev container configuration with features in
|
Simple Dev container configuration with features in
|
Docker compose configuration with features in
|
Dev container configuration with features in
|
Dev container configuration with features in
|
Dev container configuration with features in
|
|
Great testing - LGTM! |



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: