Skip to content

Commit 35681c5

Browse files
committed
Use name in multi-stage builds
1 parent 4a729ad commit 35681c5

9 files changed

Lines changed: 20 additions & 20 deletions

File tree

mongo/3.4/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# escape=`
2-
FROM microsoft/windowsservercore
2+
FROM microsoft/windowsservercore as msi
33

44
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
55

@@ -19,9 +19,9 @@ RUN Remove-Item C:\mongodb\bin\*.pdb
1919

2020
FROM microsoft/nanoserver
2121

22-
COPY --from=0 C:\mongodb\ C:\mongodb\
23-
COPY --from=0 C:\windows\system32\msvcp140.dll C:\mongodb\bin
24-
COPY --from=0 C:\windows\system32\vcruntime140.dll C:\mongodb\bin
22+
COPY --from=msi C:\mongodb\ C:\mongodb\
23+
COPY --from=msi C:\windows\system32\msvcp140.dll C:\mongodb\bin
24+
COPY --from=msi C:\windows\system32\vcruntime140.dll C:\mongodb\bin
2525

2626
RUN mkdir C:\data\db & setx /m PATH %PATH%;C:\mongodb\bin
2727

node/4.8/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/windowsservercore
1+
FROM microsoft/windowsservercore as download
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

@@ -37,7 +37,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
3737

3838
ENV NPM_CONFIG_LOGLEVEL info
3939

40-
COPY --from=0 /nodejs /nodejs
40+
COPY --from=download /nodejs /nodejs
4141

4242
RUN New-Item $($env:APPDATA + '\npm') ; \
4343
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \

node/4.8/nano/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/windowsservercore
1+
FROM microsoft/windowsservercore as download
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

@@ -37,7 +37,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
3737

3838
ENV NPM_CONFIG_LOGLEVEL info
3939

40-
COPY --from=0 /nodejs /nodejs
40+
COPY --from=download /nodejs /nodejs
4141

4242
RUN New-Item $($env:APPDATA + '\npm') ; \
4343
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \

node/6.10/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/windowsservercore
1+
FROM microsoft/windowsservercore as download
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

@@ -37,7 +37,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
3737

3838
ENV NPM_CONFIG_LOGLEVEL info
3939

40-
COPY --from=0 /nodejs /nodejs
40+
COPY --from=download /nodejs /nodejs
4141

4242
RUN New-Item $($env:APPDATA + '\npm') ; \
4343
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \

node/6.10/nano/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/windowsservercore
1+
FROM microsoft/windowsservercore as download
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

@@ -37,7 +37,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
3737

3838
ENV NPM_CONFIG_LOGLEVEL info
3939

40-
COPY --from=0 /nodejs /nodejs
40+
COPY --from=download /nodejs /nodejs
4141

4242
RUN New-Item $($env:APPDATA + '\npm') ; \
4343
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \

node/7.9/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/windowsservercore
1+
FROM microsoft/windowsservercore as download
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

@@ -37,7 +37,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
3737

3838
ENV NPM_CONFIG_LOGLEVEL info
3939

40-
COPY --from=0 /nodejs /nodejs
40+
COPY --from=download /nodejs /nodejs
4141

4242
RUN New-Item $($env:APPDATA + '\npm') ; \
4343
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \

node/7.9/nano/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/windowsservercore
1+
FROM microsoft/windowsservercore as download
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

@@ -37,7 +37,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
3737

3838
ENV NPM_CONFIG_LOGLEVEL info
3939

40-
COPY --from=0 /nodejs /nodejs
40+
COPY --from=download /nodejs /nodejs
4141

4242
RUN New-Item $($env:APPDATA + '\npm') ; \
4343
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \

registry/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.8-nanoserver
1+
FROM golang:1.8-nanoserver as gobuild
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

@@ -26,7 +26,7 @@ RUN mkdir src\github.com\docker ; \
2626
2727
FROM microsoft/nanoserver
2828
29-
COPY --from=0 /gopath/src/github.com/docker/distribution/registry.exe /registry.exe
29+
COPY --from=gobuild /gopath/src/github.com/docker/distribution/registry.exe /registry.exe
3030
COPY config.yml /config/config.yml
3131
3232
VOLUME C:\\registry

webserver/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:nanoserver
1+
FROM golang:nanoserver as gobuild
22

33
COPY . /code
44
WORKDIR /code
@@ -7,7 +7,7 @@ RUN go build webserver.go
77

88
FROM microsoft/nanoserver
99

10-
COPY --from=0 /code/webserver.exe /webserver.exe
10+
COPY --from=gobuild /code/webserver.exe /webserver.exe
1111

1212
EXPOSE 8080
1313

0 commit comments

Comments
 (0)