Skip to content

Conversation

@amits-2u
Copy link
Contributor

Description

This PR removes the # syntax=docker/dockerfile:1 directive from the public edx-platform Dockerfile.

Reason

The directive forces BuildKit-specific parsing and caused pipeline failures in environments where BuildKit is not consistently enabled (e.g., GoCD DinD elastic agents). Removing it allows the Dockerfile to be built using the default Docker builder, improving compatibility and stability across CI environments. I have added the Buildkit at agent level.

Impact

No functional changes to the image behavior

Copilot AI review requested due to automatic review settings January 16, 2026 12:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the # syntax=docker/dockerfile:1 directive from the edx-platform Dockerfile to address BuildKit compatibility issues in CI/CD environments (specifically GoCD DinD elastic agents). The author states that BuildKit has been enabled at the agent level instead.

Changes:

  • Removal of the BuildKit syntax directive from the Dockerfile header

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -1,5 +1,3 @@
# syntax=docker/dockerfile:1

# Source version args are declared before the first build stage and then
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

Removing the # syntax=docker/dockerfile:1 directive creates a critical incompatibility. This Dockerfile uses multiple BuildKit-specific features that will fail without BuildKit: heredoc syntax (RUN <<EOCMD, lines 111, 125, 264, 297), secret mounts (RUN --mount=type=secret, lines 200, 223, 240), and automatic platform ARGs (TARGETARCH, line 123). Without the syntax directive, these features will cause build failures in environments where BuildKit is not the default builder. If BuildKit is now enabled at the agent level as stated, the syntax directive should be kept for explicit compatibility declaration, or all BuildKit-specific features must be refactored to use legacy Docker syntax.

Copilot uses AI. Check for mistakes.
@amits-2u amits-2u merged commit 50e83cc into main Jan 16, 2026
9 checks passed
@amits-2u amits-2u deleted the amits-2u/disable-buildKit-dockerfile-syntax branch January 16, 2026 13:04
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.

3 participants