File tree 9 files changed +138
-28
lines changed
3.6/windows/nanoserver-1809
4.0/windows/nanoserver-1809
9 files changed +138
-28
lines changed Original file line number Diff line number Diff line change
1
+ FROM mcr.microsoft.com/windows/nanoserver:1809
2
+
3
+ SHELL ["cmd" , "/S" , "/C" ]
4
+
5
+ # PATH isn't actually set in the Docker image, so we have to set it from within the container
6
+ # ... and we'll set up C:\data with appropriate (unprivileged) permissions while we're at it
7
+ USER ContainerAdministrator
8
+ RUN setx /m PATH "C:\m ongodb\b in;%PATH%" && mkdir C:\d ata && icacls C:\d ata /grant Users:F /t
9
+ USER ContainerUser
10
+ # doing this first to share cache across versions more aggressively
11
+
12
+ COPY --from=mongo:3.6.23-windowsservercore-1809 \
13
+ C:\\ Windows\\ System32\\ msvcp140.dll \
14
+ C:\\ Windows\\ System32\\ vcruntime140.dll \
15
+ C:\\ Windows\\ System32\\ vcruntime140_1.dll \
16
+ C:\\ Windows\\ System32\\
17
+
18
+ ENV MONGO_VERSION 3.6.23
19
+
20
+ COPY --from=mongo:3.6.23-windowsservercore-1809 C:\\ mongodb C:\\ mongodb
21
+ RUN mongo --version && mongod --version
22
+
23
+ VOLUME C:\\ data\\ db C:\\ data\\ configdb
24
+
25
+ EXPOSE 27017
26
+ CMD ["mongod" , "--bind_ip_all" ]
Original file line number Diff line number Diff line change
1
+ FROM mcr.microsoft.com/windows/nanoserver:1809
2
+
3
+ SHELL ["cmd" , "/S" , "/C" ]
4
+
5
+ # PATH isn't actually set in the Docker image, so we have to set it from within the container
6
+ # ... and we'll set up C:\data with appropriate (unprivileged) permissions while we're at it
7
+ USER ContainerAdministrator
8
+ RUN setx /m PATH "C:\m ongodb\b in;%PATH%" && mkdir C:\d ata && icacls C:\d ata /grant Users:F /t
9
+ USER ContainerUser
10
+ # doing this first to share cache across versions more aggressively
11
+
12
+ COPY --from=mongo:4.0.24-windowsservercore-1809 \
13
+ C:\\ Windows\\ System32\\ msvcp140.dll \
14
+ C:\\ Windows\\ System32\\ vcruntime140.dll \
15
+ C:\\ Windows\\ System32\\ vcruntime140_1.dll \
16
+ C:\\ Windows\\ System32\\
17
+
18
+ ENV MONGO_VERSION 4.0.24
19
+
20
+ COPY --from=mongo:4.0.24-windowsservercore-1809 C:\\ mongodb C:\\ mongodb
21
+ RUN mongo --version && mongod --version
22
+
23
+ VOLUME C:\\ data\\ db C:\\ data\\ configdb
24
+
25
+ EXPOSE 27017
26
+ CMD ["mongod" , "--bind_ip_all" ]
Original file line number Diff line number Diff line change
1
+ FROM mcr.microsoft.com/windows/nanoserver:1809
2
+
3
+ SHELL ["cmd" , "/S" , "/C" ]
4
+
5
+ # PATH isn't actually set in the Docker image, so we have to set it from within the container
6
+ # ... and we'll set up C:\data with appropriate (unprivileged) permissions while we're at it
7
+ USER ContainerAdministrator
8
+ RUN setx /m PATH "C:\m ongodb\b in;%PATH%" && mkdir C:\d ata && icacls C:\d ata /grant Users:F /t
9
+ USER ContainerUser
10
+ # doing this first to share cache across versions more aggressively
11
+
12
+ COPY --from=mongo:4.2.14-windowsservercore-1809 \
13
+ C:\\ Windows\\ System32\\ msvcp140.dll \
14
+ C:\\ Windows\\ System32\\ vcruntime140.dll \
15
+ C:\\ Windows\\ System32\\ vcruntime140_1.dll \
16
+ C:\\ Windows\\ System32\\
17
+
18
+ ENV MONGO_VERSION 4.2.14
19
+
20
+ COPY --from=mongo:4.2.14-windowsservercore-1809 C:\\ mongodb C:\\ mongodb
21
+ RUN mongo --version && mongod --version
22
+
23
+ VOLUME C:\\ data\\ db C:\\ data\\ configdb
24
+
25
+ EXPOSE 27017
26
+ CMD ["mongod" , "--bind_ip_all" ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ FROM mcr.microsoft.com/windows/nanoserver:1809
2
+
3
+ SHELL ["cmd" , "/S" , "/C" ]
4
+
5
+ # PATH isn't actually set in the Docker image, so we have to set it from within the container
6
+ # ... and we'll set up C:\data with appropriate (unprivileged) permissions while we're at it
7
+ USER ContainerAdministrator
8
+ RUN setx /m PATH "C:\m ongodb\b in;%PATH%" && mkdir C:\d ata && icacls C:\d ata /grant Users:F /t
9
+ USER ContainerUser
10
+ # doing this first to share cache across versions more aggressively
11
+
12
+ COPY --from=mongo:4.4.6-windowsservercore-1809 \
13
+ C:\\ Windows\\ System32\\ msvcp140.dll \
14
+ C:\\ Windows\\ System32\\ vcruntime140.dll \
15
+ C:\\ Windows\\ System32\\ vcruntime140_1.dll \
16
+ C:\\ Windows\\ System32\\
17
+
18
+ ENV MONGO_VERSION 4.4.6
19
+
20
+ COPY --from=mongo:4.4.6-windowsservercore-1809 C:\\ mongodb C:\\ mongodb
21
+ RUN mongo --version && mongod --version
22
+
23
+ VOLUME C:\\ data\\ db C:\\ data\\ configdb
24
+
25
+ EXPOSE 27017
26
+ CMD ["mongod" , "--bind_ip_all" ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ FROM mcr.microsoft.com/windows/nanoserver:placeholder
2
+
3
+ SHELL ["cmd", "/S", "/C"]
4
+
5
+ # PATH isn't actually set in the Docker image, so we have to set it from within the container
6
+ # ... and we'll set up C:\data with appropriate (unprivileged) permissions while we're at it
7
+ USER ContainerAdministrator
8
+ RUN setx /m PATH "C:\mongodb\bin;%PATH%" && mkdir C:\data && icacls C:\data /grant Users:F /t
9
+ USER ContainerUser
10
+ # doing this first to share cache across versions more aggressively
11
+
12
+ COPY --from=placeholder \
13
+ C:\\Windows\\System32\\msvcp140.dll \
14
+ C:\\Windows\\System32\\vcruntime140.dll \
15
+ C:\\Windows\\System32\\vcruntime140_1.dll \
16
+ C:\\Windows\\System32\\
17
+
18
+ ENV MONGO_VERSION placeholder
19
+
20
+ COPY --from=placeholder C:\\mongodb C:\\mongodb
21
+ RUN mongo --version && mongod --version
22
+
23
+ VOLUME C:\\data\\db C:\\data\\configdb
24
+
25
+ EXPOSE 27017
26
+ CMD ["mongod", "--bind_ip_all"]
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ for version in "${versions[@]}"; do
101
101
102
102
for v in \
103
103
windows/windowsservercore-{1809,ltsc2016} \
104
- windows/nanoserver-{ 1809,sac2016} \
104
+ windows/nanoserver-1809 \
105
105
; do
106
106
dir=" $version /$v "
107
107
variant=" $( basename " $v " ) "
Original file line number Diff line number Diff line change @@ -187,16 +187,22 @@ for version in "${versions[@]}"; do
187
187
188
188
for winVariant in \
189
189
windowsservercore-{1809,ltsc2016} \
190
+ nanoserver-1809 \
190
191
; do
191
192
mkdir -p " $version /windows/$winVariant "
192
193
194
+ template=' Dockerfile-windows.template'
195
+ if [[ " $winVariant " == nanoserver-* ]]; then
196
+ template=' Dockerfile-windows-nanoserver.template'
197
+ fi
193
198
sed -r \
194
199
-e ' s/^(ENV MONGO_VERSION) .*/\1 ' " $fullVersion " ' /' \
195
200
-e ' s!^(ENV MONGO_DOWNLOAD_URL) .*!\1 ' " $windowsMsi " ' !' \
196
201
-e ' s/^(ENV MONGO_DOWNLOAD_SHA256)=.*/\1=' " $windowsSha256 " ' /' \
197
202
-e ' s!^(FROM .+):.+!\1:' " ${winVariant#* -} " ' !' \
203
+ -e ' s!^(COPY --from)=[^[:space:]]+!\1=mongo:' " $fullVersion " ' -windowsservercore-' " ${winVariant#* -} " ' !' \
198
204
-e ' s!(ADDLOCAL)=placeholder!\1=' " $windowsFeatures " ' !' \
199
- Dockerfile-windows. template \
205
+ " $ template" \
200
206
> " $version /windows/$winVariant /Dockerfile"
201
207
done
202
208
done
You can’t perform that action at this time.
0 commit comments