Skip to content

Conversation

@irfan-ahmed
Copy link
Member

Description

  • Added a Dockerfile so users can use this to create a Docker image and run it
  • Updated the README with information on building and running the MCP servers as Docker containers
  • Updated the README with sample MCP client configurations for Cline and other clients
  • Updated the Makefile to add a dockerize target to build the Docker images for the MCP servers

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  1. Created the Docker image using the Docker file for the MCP
  2. Tested in Cline using the documentation to set up the Docker server

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 5, 2025
@irfan-ahmed irfan-ahmed force-pushed the irfan/containerization branch 3 times, most recently from b307362 to b4d384a Compare December 9, 2025 19:02
@shopewf
Copy link
Member

shopewf commented Dec 9, 2025

Did some testing on my end: if we have to use the ~ as home operator, we need to switch all of the client configs to use os.path.expanduser to respect the $HOME mappings. Otherwise, the code will read them directly and try to open ~/.oci/... literally rather than filling in for $HOME. Without this, auth does not work in the container.


# Install python 3.13
RUN microdnf install epel-release
RUN microdnf install python3.13 python3.13-pip \
Copy link
Member

@gebhardtr gebhardtr Dec 9, 2025

Choose a reason for hiding this comment

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

each RUN will result in a new image layer; are these layers intentionally distinct?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, they are not. Moving these to a single RUN

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed this.

COPY --chown=oracle:oracle . /app

# Install dependencies
RUN pip3.13 install --upgrade --no-cache-dir pip \
Copy link
Member

@gebhardtr gebhardtr Dec 9, 2025

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Removing this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done


# Install dependencies
RUN pip3.13 install --upgrade --no-cache-dir pip \
&& pip3.13 install --no-cache-dir uv oci-cli
Copy link
Member

Choose a reason for hiding this comment

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

if it can be installed via pip, then it can be added to the list of dependencies in pyproject.toml (except for uv) and synced with the uv.lock.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's right. All our MCP servers anyway need OCI CLI for authentication, and oci-cli has a dependency of oci, so we can replace oci with oci-cli and not have to install this in the Dockerfile.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

@@ -0,0 +1,24 @@
FROM ghcr.io/oracle/oraclelinux:9-slim
Copy link
Member

Choose a reason for hiding this comment

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

for an extra layer of security, can we add the hash for this image here?

FROM <image-name>@sha256:<digest>

Copy link
Member Author

Choose a reason for hiding this comment

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

Will use the sha256 digest.

@irfan-ahmed irfan-ahmed marked this pull request as draft December 11, 2025 00:40
@irfan-ahmed irfan-ahmed force-pushed the irfan/containerization branch from b4d384a to 2458572 Compare December 11, 2025 01:21
- Added a Dockerfile so users can use this to create a docker image and run it
- Updated the README with information on building and running the MCP servers as docker containers
- Updated the README with sample MCP client configurations for Cline and other clients
- Updated the Makefile to add a dockerize target to build the docker images for the MCP servers
- Updated the servers to use expanduser so "~" can be expanded properly within the docker container or otherwise
@irfan-ahmed irfan-ahmed force-pushed the irfan/containerization branch from 2458572 to 49fb1f8 Compare December 11, 2025 18:22
@irfan-ahmed irfan-ahmed marked this pull request as ready for review December 11, 2025 18:24
)
user_agent_name = __project__.split("oracle.", 1)[1].split("-server", 1)[0]
config["additional_user_agent"] = f"{user_agent_name}/{__version__}"
private_key = oci.signer.load_private_key_from_file(config["key_file"])
Copy link
Member

Choose a reason for hiding this comment

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

why not expand user around the key files as well?

@irfan-ahmed
Copy link
Member Author

irfan-ahmed commented Dec 12, 2025 via email

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

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants