Skip to content

Commit afea5f1

Browse files
committed
1. IIS Express no longer install and run properly, temp workaround with
Web-WHC 2. Update Git version 3. New README.md
1 parent 40df31f commit afea5f1

File tree

2 files changed

+49
-4
lines changed

2 files changed

+49
-4
lines changed

windowsservercore/nuget.server/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ MAINTAINER xied75@gmail.com
44
EXPOSE 80
55

66
RUN powershell -Command \
7-
wget https://download.microsoft.com/download/C/E/8/CE8D18F5-D4C0-45B5-B531-ADECD637A1AA/Dev14%20Update%201%20MSIs/iisexpress_amd64_en-US.msi -OutFile iisexpress_amd64_en-US.msi; \
7+
Install-WindowsFeature Web-WHC; \
8+
wget https://download.microsoft.com/download/C/E/8/CE8D18F5-D4C0-45B5-B531-ADECD637A1AA/iisexpress_amd64_en-US.msi -OutFile iisexpress_amd64_en-US.msi; \
89
Start-Process -FilePath msiexec.exe -ArgumentList /i, "C:\iisexpress_amd64_en-US.msi", /qn, /L, iisexpress_amd64_en-US.install.log -PassThru -Wait; \
910
rm iisexpress_amd64_en-US.msi; \
1011
wget https://coderobin.blob.core.windows.net/public/Microsoft/Microsoft.WebApplication.zip -OutFile Microsoft.WebApplication.zip; \
1112
Expand-Archive -Path Microsoft.WebApplication.zip -DestinationPath 'C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications' -Force; \
1213
rm Microsoft.WebApplication.zip; \
13-
wget https://github.com/git-for-windows/git/releases/download/v2.9.0.windows.1/PortableGit-2.9.0-64-bit.7z.exe -OutFile PortableGit-2.9.0-64-bit.7z.exe; \
14-
Start-Process -FilePath PortableGit-2.9.0-64-bit.7z.exe -ArgumentList '-y' -PassThru -Wait; \
15-
rm PortableGit-2.9.0-64-bit.7z.exe; \
14+
wget https://github.com/git-for-windows/git/releases/download/v2.11.0.windows.1/PortableGit-2.11.0-64-bit.7z.exe -OutFile PortableGit-2.11.0-64-bit.7z.exe; \
15+
Start-Process -FilePath PortableGit-2.11.0-64-bit.7z.exe -ArgumentList '-y' -PassThru -Wait; \
16+
rm PortableGit-2.11.0-64-bit.7z.exe; \
1617
C:\PortableGit\bin\git.exe clone https://github.com/coderobin/nuget.server.web.git; \
1718
C:\nuget.exe restore C:\nuget.server.web\NuGet.Server.Web.sln; \
1819
Start-Process -FilePath 'C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe' -ArgumentList 'C:\nuget.server.web\NuGet.Server.Web.sln', '/p:Configuration=Release' -PassThru -Wait; \
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#### Example Usage
2+
3+
```
4+
docker run -d --ip 172.30.225.12 --name nuget --hostname nuget --restart=always -v C:\Users\dong\Documents\Deployments\volumes\nuget\Packages:C:/nuget.server.web/NuGet.Server.Web/Packages coderobin/nuget.server:latest
5+
```
6+
7+
8+
#### Best practices
9+
10+
**Do not** expose your NuGet Server directly to the world, put an NGINX before it.
11+
12+
13+
#### Configuration
14+
15+
1. After the container is up and running, do ```docker exec -it nuget powershell``` to get into it, edit *c:\nuget.server.web\NuGet.Server.Web\web.config* file for the **ApiKey**:
16+
17+
```
18+
<!--
19+
Determines if an Api Key is required to push\delete packages from the server.
20+
-->
21+
<add key="requireApiKey" value="true" />
22+
<!--
23+
Set the value here to allow people to push/delete packages from the server.
24+
NOTE: This is a shared key (password) for all users.
25+
-->
26+
<add key="apiKey" value="**GENERATE_YOUR_APIKEY_HERE**" />
27+
```
28+
29+
2. Edit *C:\nuget.server.web\NuGet.Server.Web\App_Data\UserCredentials.xml* file for UserName and Password:
30+
31+
```
32+
<string>yourusername;yoursecurepassword;admin</string>
33+
```
34+
35+
*admin* here is an arbitrary role name, it has no effects for now.
36+
37+
3. Then you can config your NuGet cli for sources with ApiKey and UserName and Password.
38+
39+
4. If you enable 1 and 2, please use an NGINX for SSL termination so that secrets travel in https
40+
41+
42+
#### issues:
43+
44+
1. https://github.com/Microsoft/Virtualization-Documentation/issues/524

0 commit comments

Comments
 (0)