Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -255,7 +255,7 @@ of this dockerfile is that second and third lines are considered a single |
| 255 | 255 |
instruction: |
| 256 | 256 |
|
| 257 | 257 |
```Dockerfile |
| 258 |
-FROM windowsservercore |
|
| 258 |
+FROM microsoft/nanoserver |
|
| 259 | 259 |
COPY testfile.txt c:\\ |
| 260 | 260 |
RUN dir c:\ |
| 261 | 261 |
``` |
| ... | ... |
@@ -264,9 +264,9 @@ Results in: |
| 264 | 264 |
|
| 265 | 265 |
PS C:\John> docker build -t cmd . |
| 266 | 266 |
Sending build context to Docker daemon 3.072 kB |
| 267 |
- Step 1 : FROM windowsservercore |
|
| 268 |
- ---> dbfee88ee9fd |
|
| 269 |
- Step 2 : COPY testfile.txt c:RUN dir c: |
|
| 267 |
+ Step 1/2 : FROM microsoft/nanoserver |
|
| 268 |
+ ---> 22738ff49c6d |
|
| 269 |
+ Step 2/2 : COPY testfile.txt c:\RUN dir c: |
|
| 270 | 270 |
GetFileAttributesEx c:RUN: The system cannot find the file specified. |
| 271 | 271 |
PS C:\John> |
| 272 | 272 |
|
| ... | ... |
@@ -280,7 +280,7 @@ expected with the use of natural platform semantics for file paths on `Windows`: |
| 280 | 280 |
|
| 281 | 281 |
# escape=` |
| 282 | 282 |
|
| 283 |
- FROM windowsservercore |
|
| 283 |
+ FROM microsoft/nanoserver |
|
| 284 | 284 |
COPY testfile.txt c:\ |
| 285 | 285 |
RUN dir c:\ |
| 286 | 286 |
|
| ... | ... |
@@ -288,30 +288,29 @@ Results in: |
| 288 | 288 |
|
| 289 | 289 |
PS C:\John> docker build -t succeeds --no-cache=true . |
| 290 | 290 |
Sending build context to Docker daemon 3.072 kB |
| 291 |
- Step 1 : FROM windowsservercore |
|
| 292 |
- ---> dbfee88ee9fd |
|
| 293 |
- Step 2 : COPY testfile.txt c:\ |
|
| 294 |
- ---> 99ceb62e90df |
|
| 295 |
- Removing intermediate container 62afbe726221 |
|
| 296 |
- Step 3 : RUN dir c:\ |
|
| 297 |
- ---> Running in a5ff53ad6323 |
|
| 291 |
+ Step 1/3 : FROM microsoft/nanoserver |
|
| 292 |
+ ---> 22738ff49c6d |
|
| 293 |
+ Step 2/3 : COPY testfile.txt c:\ |
|
| 294 |
+ ---> 96655de338de |
|
| 295 |
+ Removing intermediate container 4db9acbb1682 |
|
| 296 |
+ Step 3/3 : RUN dir c:\ |
|
| 297 |
+ ---> Running in a2c157f842f5 |
|
| 298 | 298 |
Volume in drive C has no label. |
| 299 |
- Volume Serial Number is 1440-27FA |
|
| 300 |
- |
|
| 299 |
+ Volume Serial Number is 7E6D-E0F7 |
|
| 300 |
+ |
|
| 301 | 301 |
Directory of c:\ |
| 302 |
- |
|
| 303 |
- 03/25/2016 05:28 AM <DIR> inetpub |
|
| 304 |
- 03/25/2016 04:22 AM <DIR> PerfLogs |
|
| 305 |
- 04/22/2016 10:59 PM <DIR> Program Files |
|
| 306 |
- 03/25/2016 04:22 AM <DIR> Program Files (x86) |
|
| 307 |
- 04/18/2016 09:26 AM 4 testfile.txt |
|
| 308 |
- 04/22/2016 10:59 PM <DIR> Users |
|
| 309 |
- 04/22/2016 10:59 PM <DIR> Windows |
|
| 310 |
- 1 File(s) 4 bytes |
|
| 311 |
- 6 Dir(s) 21,252,689,920 bytes free |
|
| 312 |
- ---> 2569aa19abef |
|
| 313 |
- Removing intermediate container a5ff53ad6323 |
|
| 314 |
- Successfully built 2569aa19abef |
|
| 302 |
+ |
|
| 303 |
+ 10/05/2016 05:04 PM 1,894 License.txt |
|
| 304 |
+ 10/05/2016 02:22 PM <DIR> Program Files |
|
| 305 |
+ 10/05/2016 02:14 PM <DIR> Program Files (x86) |
|
| 306 |
+ 10/28/2016 11:18 AM 62 testfile.txt |
|
| 307 |
+ 10/28/2016 11:20 AM <DIR> Users |
|
| 308 |
+ 10/28/2016 11:20 AM <DIR> Windows |
|
| 309 |
+ 2 File(s) 1,956 bytes |
|
| 310 |
+ 4 Dir(s) 21,259,096,064 bytes free |
|
| 311 |
+ ---> 01c7f3bef04f |
|
| 312 |
+ Removing intermediate container a2c157f842f5 |
|
| 313 |
+ Successfully built 01c7f3bef04f |
|
| 315 | 314 |
PS C:\John> |
| 316 | 315 |
|
| 317 | 316 |
## Environment replacement |
| ... | ... |
@@ -1596,7 +1595,7 @@ well as alternate shells available including `sh`. |
| 1596 | 1596 |
The `SHELL` instruction can appear multiple times. Each `SHELL` instruction overrides |
| 1597 | 1597 |
all previous `SHELL` instructions, and affects all subsequent instructions. For example: |
| 1598 | 1598 |
|
| 1599 |
- FROM windowsservercore |
|
| 1599 |
+ FROM microsoft/windowsservercore |
|
| 1600 | 1600 |
|
| 1601 | 1601 |
# Executed as cmd /S /C echo default |
| 1602 | 1602 |
RUN echo default |
| ... | ... |
@@ -1645,7 +1644,7 @@ the `escape` parser directive: |
| 1645 | 1645 |
|
| 1646 | 1646 |
# escape=` |
| 1647 | 1647 |
|
| 1648 |
- FROM windowsservercore |
|
| 1648 |
+ FROM microsoft/nanoserver |
|
| 1649 | 1649 |
SHELL ["powershell","-command"] |
| 1650 | 1650 |
RUN New-Item -ItemType Directory C:\Example |
| 1651 | 1651 |
ADD Execute-MyCmdlet.ps1 c:\example\ |
| ... | ... |
@@ -1654,36 +1653,36 @@ the `escape` parser directive: |
| 1654 | 1654 |
Resulting in: |
| 1655 | 1655 |
|
| 1656 | 1656 |
PS E:\docker\build\shell> docker build -t shell . |
| 1657 |
- Sending build context to Docker daemon 3.584 kB |
|
| 1658 |
- Step 1 : FROM windowsservercore |
|
| 1659 |
- ---> 5bc36a335344 |
|
| 1660 |
- Step 2 : SHELL powershell -command |
|
| 1661 |
- ---> Running in 87d7a64c9751 |
|
| 1662 |
- ---> 4327358436c1 |
|
| 1663 |
- Removing intermediate container 87d7a64c9751 |
|
| 1664 |
- Step 3 : RUN New-Item -ItemType Directory C:\Example |
|
| 1665 |
- ---> Running in 3e6ba16b8df9 |
|
| 1666 |
- |
|
| 1667 |
- |
|
| 1657 |
+ Sending build context to Docker daemon 4.096 kB |
|
| 1658 |
+ Step 1/5 : FROM microsoft/nanoserver |
|
| 1659 |
+ ---> 22738ff49c6d |
|
| 1660 |
+ Step 2/5 : SHELL powershell -command |
|
| 1661 |
+ ---> Running in 6fcdb6855ae2 |
|
| 1662 |
+ ---> 6331462d4300 |
|
| 1663 |
+ Removing intermediate container 6fcdb6855ae2 |
|
| 1664 |
+ Step 3/5 : RUN New-Item -ItemType Directory C:\Example |
|
| 1665 |
+ ---> Running in d0eef8386e97 |
|
| 1666 |
+ |
|
| 1667 |
+ |
|
| 1668 | 1668 |
Directory: C:\ |
| 1669 |
- |
|
| 1670 |
- |
|
| 1669 |
+ |
|
| 1670 |
+ |
|
| 1671 | 1671 |
Mode LastWriteTime Length Name |
| 1672 | 1672 |
---- ------------- ------ ---- |
| 1673 |
- d----- 6/2/2016 2:59 PM Example |
|
| 1674 |
- |
|
| 1675 |
- |
|
| 1676 |
- ---> 1f1dfdcec085 |
|
| 1677 |
- Removing intermediate container 3e6ba16b8df9 |
|
| 1678 |
- Step 4 : ADD Execute-MyCmdlet.ps1 c:\example\ |
|
| 1679 |
- ---> 6770b4c17f29 |
|
| 1680 |
- Removing intermediate container b139e34291dc |
|
| 1681 |
- Step 5 : RUN c:\example\Execute-MyCmdlet -sample 'hello world' |
|
| 1682 |
- ---> Running in abdcf50dfd1f |
|
| 1683 |
- Hello from Execute-MyCmdlet.ps1 - passed hello world |
|
| 1684 |
- ---> ba0e25255fda |
|
| 1685 |
- Removing intermediate container abdcf50dfd1f |
|
| 1686 |
- Successfully built ba0e25255fda |
|
| 1673 |
+ d----- 10/28/2016 11:26 AM Example |
|
| 1674 |
+ |
|
| 1675 |
+ |
|
| 1676 |
+ ---> 3f2fbf1395d9 |
|
| 1677 |
+ Removing intermediate container d0eef8386e97 |
|
| 1678 |
+ Step 4/5 : ADD Execute-MyCmdlet.ps1 c:\example\ |
|
| 1679 |
+ ---> a955b2621c31 |
|
| 1680 |
+ Removing intermediate container b825593d39fc |
|
| 1681 |
+ Step 5/5 : RUN c:\example\Execute-MyCmdlet 'hello world' |
|
| 1682 |
+ ---> Running in be6d8e63fe75 |
|
| 1683 |
+ hello world |
|
| 1684 |
+ ---> 8e559e9bf424 |
|
| 1685 |
+ Removing intermediate container be6d8e63fe75 |
|
| 1686 |
+ Successfully built 8e559e9bf424 |
|
| 1687 | 1687 |
PS E:\docker\build\shell> |
| 1688 | 1688 |
|
| 1689 | 1689 |
The `SHELL` instruction could also be used to modify the way in which |