mirror of
https://github.com/microsoft/mcp.git
synced 2026-11-04 12:01:31 +00:00
Use trimmed azmcp for Docker (#423)
* Use trimmed azmcp for Docker * revert to original mcr image
This commit is contained in:
1 parent
834b6fc9c0
commit
e3cee2541b
2 files changed
+10
-7
No files matched your search
+7
-5
@@ -9,14 +9,16 @@ RUN if [ -z "$PUBLISH_DIR" ]; then \
|
||||
echo "ERROR: PUBLISH_DIR build argument is required" && exit 1; \
|
||||
fi
|
||||
|
||||
# Copy the contents of the publish directory
|
||||
COPY ${PUBLISH_DIR} .
|
||||
# Copy the contents of the publish directory to '/azuremcpserver' and set it as the working directory
|
||||
RUN mkdir -p /azuremcpserver
|
||||
COPY ${PUBLISH_DIR} /azuremcpserver/
|
||||
WORKDIR /azuremcpserver
|
||||
|
||||
# List the contents of the current directory
|
||||
RUN ls -la
|
||||
|
||||
RUN if [ ! -f "azmcp.dll" ]; then \
|
||||
echo "ERROR: azmcp 'azmcp.dll' does not exist" && exit 1; \
|
||||
RUN if [ ! -f "azmcp" ]; then \
|
||||
echo "ERROR: azmcp executable does not exist" && exit 1; \
|
||||
fi
|
||||
|
||||
ENTRYPOINT ["dotnet", "azmcp.dll", "server", "start"]
|
||||
ENTRYPOINT ["./azmcp", "server", "start"]
|
||||
@@ -23,11 +23,12 @@ if(!$Version) {
|
||||
# Will fix this when we update Dockerfile to multi-platform
|
||||
$os = "linux"
|
||||
$arch = "x64"
|
||||
$SingleFile = $Trimmed
|
||||
$tag = "$dockerImageName`:$Version$VersionSuffix";
|
||||
|
||||
& "$root/eng/scripts/Build-Module.ps1" -ServerName $ServerName -VersionSuffix $VersionSuffix -SelfContained -Trimmed:$Trimmed -DebugBuild:$DebugBuild -OperatingSystem $os -Architecture $arch
|
||||
& "$root/eng/scripts/Build-Module.ps1" -ServerName $ServerName -VersionSuffix $VersionSuffix -SelfContained -Trimmed:$Trimmed -SingleFile:$SingleFile -DebugBuild:$DebugBuild -OperatingSystem $os -Architecture $arch
|
||||
|
||||
[string]$publishDirectory = $([System.IO.Path]::Combine($distPath, "$os-$arch", "dist"))
|
||||
[string]$publishDirectory = $([System.IO.Path]::Combine($distPath, "build", $ServerName, "$os-$arch", "dist"))
|
||||
$relativeDirectory = $(Resolve-Path $publishDirectory -Relative).Replace('\', '/')
|
||||
|
||||
Write-Host "Building Docker image ($tag). PATH: [$relativeDirectory]. Absolute: [$publishDirectory]."
|
||||
|
||||
Reference in new issue
Block a user