Skip to content

fix: resolve Dockerfile not found in containerized edxapp sandbox builds - #365

Merged
srathod-apphelix merged 2 commits into
masterfrom
srathod/GSRE-4332-sandbox-edx-platform-dockerfile-not-found
Aug 5, 2026
Merged

fix: resolve Dockerfile not found in containerized edxapp sandbox builds#365
srathod-apphelix merged 2 commits into
masterfrom
srathod/GSRE-4332-sandbox-edx-platform-dockerfile-not-found

Conversation

@srathod-apphelix

Copy link
Copy Markdown
Member

Summary

  • Fix CreateSandbox containerized edxapp failing with Dockerfile not found
  • edx-platform checkout no longer contains a Dockerfile on current branches
  • Update LMS/CMS/worker provisioners to build without relying on that in-repo file

Jira - GSRE-4332

Purpose

Containerized sandbox image builds looked for Dockerfile inside the cloned edx-platform repo. That file was removed from edx-platform, so Docker build failed and CreateSandbox could not finish LMS/CMS (and worker) provisioning. This change removes that dependency so the build can succeed again.

Changes

  • Build base image from public-dockerfiles edx-platform.Dockerfile
  • Build LMS/CMS from the private overlay Dockerfile already copied to the host
  • Update worker image build the same way (reuse LMS image or build from public Dockerfile)
  • Use edx-platform:lms / edx-platform:cms tags for LMS/CMS run/compose steps

Copilot AI lite review requested due to automatic review settings August 4, 2026 13:15

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the Jenkins sandbox provisioning scripts to stop relying on an in-repo Dockerfile inside edx-platform (which no longer exists) by building from the edx/public-dockerfiles edx-platform.Dockerfile and by using explicit :lms / :cms image tags during LMS/CMS provisioning and runtime steps.

Changes:

  • Build the edx-platform base image using edx/public-dockerfiles instead of expecting Dockerfile in the checked-out edx-platform repo.
  • Build LMS/CMS images via the private overlay Dockerfile, tagging outputs as edx-platform:lms / edx-platform:cms (and re-tagging :latest to LMS for compatibility).
  • Update worker provisioning to reuse the existing edx-platform image when available, otherwise build from the public Dockerfile.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
util/jenkins/worker-container-provisioner.sh Reuses an existing edx-platform image (or builds from public-dockerfiles) to avoid relying on an in-repo Dockerfile.
util/jenkins/app-container-provisioner.sh Switches LMS/CMS base build to the public edx-platform Dockerfile and updates runtime steps to use :lms / :cms tags.
util/jenkins/ansible-provision.sh Adjusts LMS/CMS provisioning variables/tags, but currently includes unresolved merge conflict markers.
Suppressed comments (2)

util/jenkins/ansible-provision.sh:978

  • Unresolved merge conflict markers will cause this script to error before provisioning edx-exams. Resolve the conflict and keep the quoted secret-id form to avoid word-splitting issues.
<<<<<<< Updated upstream
    app_git_ssh_key=$(aws secretsmanager get-secret-value --region "${region}" --secret-id "${configuration_secure_secret}" --query SecretString --output text | jq -r '._local_git_identity')
=======
    app_git_ssh_key=$(aws secretsmanager get-secret-value --region "${region}" --secret-id $configuration_secure_secret --query SecretString --output text | jq -r '._local_git_identity')
>>>>>>> Stashed changes

util/jenkins/ansible-provision.sh:1006

  • Unresolved merge conflict markers will cause this script to error before provisioning subscriptions. Resolve the conflict and keep the quoted secret-id form to avoid word-splitting issues.
<<<<<<< Updated upstream
    app_git_ssh_key=$(aws secretsmanager get-secret-value --region "${region}" --secret-id "${configuration_secure_secret}" --query SecretString --output text | jq -r '._local_git_identity')
=======
    app_git_ssh_key=$(aws secretsmanager get-secret-value --region "${region}" --secret-id $configuration_secure_secret --query SecretString --output text | jq -r '._local_git_identity')
>>>>>>> Stashed changes

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

Comment thread util/jenkins/app-container-provisioner.sh
Comment thread util/jenkins/ansible-provision.sh Outdated
Copilot AI review requested due to automatic review settings August 5, 2026 07:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Suppressed comments (2)

util/jenkins/app-container-provisioner.sh:82

  • EDX_PLATFORM_VERSION is expanded into the generated script without quotes. If ${app_version} ever contains whitespace or shell-glob characters, the docker build command can receive a split/mangled build-arg value and fail or build the wrong ref. Quote the build-arg value to keep it intact.
        docker build \
          -f /tmp/edx-platform.Dockerfile \
          --target base \
          --build-arg EDX_PLATFORM_REPO=edx/edx-platform \
          --build-arg EDX_PLATFORM_VERSION=${app_version} \
          --secret id=GIT_AUTH_TOKEN,env=GITHUB_TOKEN \

util/jenkins/app-container-provisioner.sh:73

  • The base/overlay image builds rely on GITHUB_TOKEN being present (used as the BuildKit GIT_AUTH_TOKEN secret). If the token is missing from Secrets Manager, the script will proceed and fail later with a less actionable Docker/Git error. Consider failing fast with a clear message when the token is empty.
        set +x
        export GITHUB_TOKEN='${app_github_token}'
        set -x

Comment on lines +786 to +790
configuration_secure_json=$(aws secretsmanager get-secret-value --region "${region}" --secret-id "${configuration_secure_secret}" --query SecretString --output text)
app_git_ssh_key=$(echo "$configuration_secure_json" | jq -r '._local_git_identity // empty')
# Required by internal edx-platform-private Dockerfile (BuildKit GIT_AUTH_TOKEN) to fetch
# private repos such as edx-internal and edx-themes over HTTPS.
app_github_token=$(echo "$configuration_secure_json" | jq -r '.GITHUB_TOKEN // .github_access_token // .github_token // empty')
@srathod-apphelix
srathod-apphelix merged commit 840c604 into master Aug 5, 2026
2 of 4 checks passed
@srathod-apphelix
srathod-apphelix deleted the srathod/GSRE-4332-sandbox-edx-platform-dockerfile-not-found branch August 5, 2026 07:27
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