This repository was archived by the owner on Aug 29, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1- FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.15 AS build-env
1+ FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
22
33ARG MS_NUGET_URL=https://nuget.pkg.github.com/microsoft/index.json
44ARG MSGRAPH_NUGET_URL=https://nuget.pkg.github.com/microsoftgraph/index.json
@@ -9,21 +9,24 @@ WORKDIR /app
99
1010COPY ./src ./msgraph-cli/src
1111COPY ./msgraph-cli-core ./msgraph-cli/msgraph-cli-core
12- RUN ls -al ./msgraph-cli/src/generated/DeviceManagement/ApplePushNotificationCertificate
1312WORKDIR /app/msgraph-cli
1413
1514RUN dotnet nuget add source ${MS_NUGET_URL} -n ms-gh -u ${NUGET_USER} -p ${NUGET_PASSWORD} --store-password-in-clear-text &&\
1615 dotnet nuget add source ${MSGRAPH_NUGET_URL} -n msgraph-gh -u ${NUGET_USER} -p ${NUGET_PASSWORD} --store-password-in-clear-text
1716
1817RUN dotnet publish ./src/msgraph-cli.csproj --configuration Release --no-self-contained -p:PublishSingleFile=false -p:PublishReadyToRun=false
1918
20- FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine3.15 as runtime
19+ FROM mcr.microsoft.com/dotnet/runtime:6.0 as runtime
20+
2121WORKDIR /app
2222
23- COPY --from=build-env /app/msgraph-cli/src/msgraph-cli/bin/Release/net6.0/publish ./
23+ COPY --from=build-env /app/msgraph-cli/src/bin/Release/net6.0/${RID}/ ./dist
24+ RUN echo 'export PATH=$PATH:/app/dist' > /app/.bash_profile
25+
26+ ENV HOME=/app
2427
25- ENV HOME=/app/home
28+ # CMD ["bash", "-l"]
29+ ENTRYPOINT ["/app/dist/mgc" ]
2630
27- ENTRYPOINT ["dotnet" , "mgc.dll" ]
2831LABEL description="# Welcome to the Microsoft Graph CLI \
2932[Source dockerfile](https://github.com/microsoftgraph/msgraph-cli/blob/main/Dockerfile)"
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ static IHostBuilder CreateHostBuilder(string[] args) =>
123123
124124 static void ConfigureAppConfiguration ( IConfigurationBuilder builder ) {
125125 builder . Sources . Clear ( ) ;
126- builder . AddJsonFile ( "app-settings.json" , optional : false ) ;
126+ builder . AddJsonFile ( Path . Combine ( Path . GetDirectoryName ( System . Reflection . Assembly . GetExecutingAssembly ( ) . Location ) , "app-settings.json" ) , optional : false ) ;
127127 var pathUtil = new PathUtility ( ) ;
128128 var authCache = new AuthenticationCacheUtility ( pathUtil ) ;
129129 var dataDir = pathUtil . GetApplicationDataDirectory ( ) ;
You can’t perform that action at this time.
0 commit comments