Skip to content

Support self-contained Docker Compose builds from a remote Git context #4179

Description

@Skyline-23

Area

Installation or packaging

What are you trying to accomplish?

Deploy and update OpenCodex through a deployment dashboard's Raw Compose configuration, using the official repository as a remote Git build context and pull_policy: build.

An operator should be able to press Deploy without maintaining a custom Dockerfile, embedding dockerfile_inline, creating a deployment fork, or manually preparing a source checkout on the server. Docker/BuildKit should handle the build from the selected official Git ref.

What prevents this today?

The official source-build support exists, but its build context must be prepared outside Docker first:

Consequently, a clean remote Git context does not contain an input required by the Dockerfile. The operator needs host-side preparation or a custom build recipe even though the repository already provides an official Dockerfile. pull_policy: build does not supply that missing preparation step.

This limitation was checked against v2.49.0 / main commit 2f3f736299dca38861f8fb9c4326a4b4d7c664bc.

What should OpenCodex do?

Make the official Docker build self-contained, so it can prepare the required compatibility manifest as part of the build from a clean supported Git context.

Expected outcomes:

  • A clean remote Git-context build succeeds without installing Bun on the host or running a separate preparation command.
  • Operators can use the official Dockerfile through Raw Compose without maintaining an additional file, inline Dockerfile, or fork.
  • Redeploying with pull_policy: build builds the selected Git ref and retains the existing persistent-state contract.
  • Compatibility identity remains derived from the correct source snapshot, and existing source-integrity checks remain enforced. Removing validation or substituting a placeholder manifest would not satisfy the request.
  • The documentation includes a supported remote-context Compose example and any required BuildKit options.

Example usage or interface

Desired build configuration within an otherwise configured Compose service:

services:
  opencodex:
    image: opencodex:local
    pull_policy: build
    build:
      context: https://github.com/lidge-jun/opencodex.git#main
      target: runtime

The operator keeps the normal state volumes and runtime settings, then presses Deploy in Dokploy. A release tag or commit can replace main when a fixed version is preferred. This example describes the requested workflow; it is not a claim that the current Dockerfile already supports it.

Alternatives or workarounds

  • A custom Dockerfile can fetch the repository and generate the manifest before building. Keeping it in a dashboard File Mount works, but duplicates upstream packaging and creates another file for each operator to maintain.
  • Manually cloning the repository, running the generator, and building from that checkout follows today's documented process, but leaves dashboard-managed deployments dependent on separate server-side maintenance.
  • Publishing an official container image would offer another deployment path, but is not required for this request. Source builds with pull_policy: build are acceptable.

Additional context

This is a focused follow-up to #3449, which delivered the official source-build container workflow. The remaining request is to make that workflow usable directly from a clean remote Git context in Raw Compose.

Reference: Remote Hub — Docker Compose.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinstallInstallation or packaging

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions