Skip to content

Conversation

@Kaniska244
Copy link
Contributor

@Kaniska244 Kaniska244 commented Dec 5, 2025

Ref# https://github.com/github/codespaces/issues/22031

Description of changes:

  • The above codespace availability incident was created to address the multiple outages noticed in DockerHub registry which caused downtime for codepaces as devcontainer up and build commands injects syntax directive # syntax=docker/dockerfile:1.4 which forces devcontainer cli to download docker/dockerfile:1.4 parser image from DockerHub registry. This is not required for docker engine version v23 onwards as the default moby buildkit version includes docker/dockerfile:1.4 or higher version of the parser. As part of this PR adding check to skip addition of #syntax directive when docker engine version >= 23.0.0 and rolling back Adding precautionary check for DockerHub registry availability in dev container cli #1113 changes.

Changelog:

  • Changed src/spec-node/containerFeatures.ts To rollback changes made in Adding precautionary check for DockerHub registry availability in dev container cli #1113 and also introduced check to skip addition of #syntax directive when docker engine version >= 23.0.0
  • Changes made in src/spec-node/devContainers.ts to fetch the docker engine version at the very beginning of dev container cli command devcontainer build or devcontainer up.
  • Changes in src/spec-node/utils.ts to rollback changes of Adding precautionary check for DockerHub registry availability in dev container cli #1113 and added a new attribute dockerEngineVersion for DockerResolverParameters interface.
  • Changes made in src/spec-shutdown/dockerUtils.ts to add a new function to fetch the docker engine version.
  • Added a new workflow .github/workflows/test-docker-v20.yml to demonstrate the behavior of dev container cli with the implementation of the new logic to skip the addition of #syntax directive in older docker engine version v20.

Checklist:

  • All checks are passed.

@Kaniska244 Kaniska244 changed the title Adding check to skip addition of #syntax directive when docker engine version < 23.0.0 Skip addition of #syntax directive when docker engine version < 23.0.0 Dec 5, 2025
@Kaniska244 Kaniska244 changed the title Skip addition of #syntax directive when docker engine version < 23.0.0 Skip addition of #syntax directive when docker engine version >= 23.0.0 Dec 5, 2025
@Kaniska244 Kaniska244 marked this pull request as ready for review December 5, 2025 17:42
@Kaniska244 Kaniska244 requested a review from a team as a code owner December 5, 2025 17:42
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.

1 participant