Skip to content

Simplify Docker images to use package-installed script paths #564

Open

Description

@guanzhousongmicrosoft

Parent Issue

Part of #561 (Make DocumentDB usable from package install)

Problem

Docker images currently COPY scripts from the build context into the image at build time, duplicating what the gateway package already installs. This creates two different code paths -- the Docker path and the package path -- that can drift apart. It also means the Docker image does not exercise the same file layout that package users get.

Solution

Since the gateway .deb now ships scripts at /usr/share/documentdb/scripts/ and sample data at /usr/share/documentdb/sample-data/ (#563), Docker images should use those package-installed paths directly.

Changes

  1. Dockerfile_documentdb_local (main Docker image):

    • Remove COPY scripts/ lines
    • Use /usr/share/documentdb/scripts/ as WORKDIR and entrypoint
    • Add jq to package install (runtime dependency)
  2. emulator_entrypoint.sh (Docker entrypoint):

    • Add dual-path resolution: check /usr/share/documentdb/scripts first, fall back to legacy /home/documentdb/gateway/scripts for backward compatibility
    • Use mktemp for runtime config copy (instead of predictable /tmp path)
    • Proper trap cleanup for temp files
  3. Test Dockerfiles (DEB + RHEL-8 + RHEL-9 gateway tests):

    • Same migration: remove COPY lines, use package paths
    • Add jq install where needed
  4. test-gateway-install-entrypoint.sh:

    • Update script path to /usr/share/documentdb/scripts/

Benefit

Single source of truth for script paths. Docker images and bare-metal installs use identical file layouts. Any script change in the repo automatically flows through packages to both Docker and bare-metal users.

Activity

  1. added
    enhancement
    documentdb-local
    on Apr 7, 2026
  2. added this to the 0.111-0 milestone on Apr 7, 2026
  3. sthapa commented on May 18, 2026

    @sthapa

    Looking at making this change

  4. documentdb-triage-tool commented on Jun 2, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  5. sthapa commented on Jun 6, 2026

    @sthapa

    yes, still working on it

  6. documentdb-triage-tool commented on Jun 20, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  7. documentdb-triage-tool commented on Jul 5, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  8. documentdb-triage-tool commented on Jul 20, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 15 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  9. removed this from the 0.111-0 milestone on Jul 24, 2026
  10. added this to the 0.115-0 milestone on Jul 24, 2026
  11. documentdb-triage-tool commented on Aug 15, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  12. documentdb-triage-tool commented on Aug 29, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  13. documentdb-triage-tool commented on Sep 13, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  14. documentdb-triage-tool commented on Sep 27, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  15. guanzhousongmicrosoft commented on Oct 5, 2026

    @guanzhousongmicrosoft
    MemberAuthor

    Status: dual-path script resolution, the mktemp config copy and the EXIT trap are on main. The image still COPYs scripts into the legacy path, because the packages don't yet ship every script the entrypoint sources (start_oss_server.sh, utils.sh, preload_libraries.sh, ...). That depends on #563. Moving this to Backlog, and I removed the stale merged label.

  16. documentdb-triage-tool commented on Oct 28, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 23 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  17. documentdb-triage-tool commented on Nov 11, 2026

    @documentdb-triage-tool

    👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

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

Metadata

Metadata

Labels

documentdb-localenhancementinfrastructurepackaging

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions