Pinning to explicit image versions provides greater control over which version runs in your deployment. Using openedge-mcp-server:latest is appropriate when load_images.sh is the controlled mechanism for loading releases. However, explicit tags or digests provide:

  • Reproducible records of exact images in use
  • Prevention of unintended version changes from later image loads
  • Support for release-approval processes

Follow these steps to pin an explicit image reference:

  1. Set the desired image tag or digest:
    export SERVER_IMAGE_REFERENCE=openedge-mcp-server:<version>
  2. Apply the image reference to the generated profile compose file:
    # Update profile compose file
    sed -i -E \
      "s|^([[:space:]]*image:).*|\1 ${SERVER_IMAGE_REFERENCE}|" \
      "generated/$PROFILE/docker-compose.mcp.yml"
  3. Apply the same image reference to the production export compose file:
    # Or update production export compose file
    sed -i -E \
      "s|^([[:space:]]*image:).*|\1 ${SERVER_IMAGE_REFERENCE}|" \
      "$EXPORT_DIR/docker-compose.mcp.yml"
    Always back up the original compose file before modifying image references to support rollback.
  4. Recreate the container to apply the image reference change:
    • For standard profiles:
      cd "$OEMCP_HOME"
      ./mcpgen stop "$PROFILE"
      ./mcpgen start "$PROFILE"
      
      # Verify the container uses the pinned image
      docker inspect --format '{{.Config.Image}}' "${PROFILE}"
    • For production exports:
      cd "$EXPORT_DIR"
      ./run.sh stop --port <port> --name <container-name>
      ./run.sh start --port <port> --name <container-name>
      
      # Verify the container uses the pinned image
      docker inspect --format '{{.Config.Image}}' <container-name>
    Note: Editing the compose file does not change already-running containers. The container must be stopped and restarted for the new image reference to take effect.