-
Notifications
You must be signed in to change notification settings - Fork 254
Support multi-platform builds. Use distroless image. #742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| COPY ${PUBLISH_DIR}/${TARGETOS}-${TARGETARCH}/dist/ /azuremcpserver/ | ||
| WORKDIR /azuremcpserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be easier to support by templating PUBLISH_DIR with os and arch outside of the docker build call... we should also just assume PUBLISH_DIR is a path to binary root. Also, we'll need to support other servers:
| COPY ${PUBLISH_DIR}/${TARGETOS}-${TARGETARCH}/dist/ /azuremcpserver/ | |
| WORKDIR /azuremcpserver | |
| COPY ${PUBLISH_DIR} /mcpserver/ | |
| WORKDIR /mcpserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, to support multiple servers, we need to start passing the CLI name in. This is a little difficult as ENTRYPOINT doesn't have access to build variables and doesn't evaluate environment variables, se we can't do something simple like:
ENTRYPOINT ["./${CLI_NAME}", "server", "start"]or even
ENV CLI=${CLI_NAME}
ENTRYPOINT ["./$CLI", "server", "start"]If we use the exec form, but invoke the shell, we can still wire up additional docker run args:
ENV CLI=${CLI_NAME}
ENTRYPOINT ["sh", "-c", "./$CLI server start $@"]
I'm not sure how this compares to the shell form:
ENV CLI=${CLI_NAME}
ENTRYPOINT "./$CLI" server start $0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the shell-via-exec form, I was able to pass additional command line parameters through a docker run call:
> docker run azure-sdk/template-mcp:0.0.12-alpha.12345 --version
0.0.12-alpha.12345+3af3798511a7cf2441b662c2473941070331c5de
| foreach ($os in $operatingSystems) { | ||
|
|
||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed anymore?
| foreach ($os in $operatingSystems) { | |
| } |
What does this PR do?
GitHub issue number?
#146 #302
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentation/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.mdToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline