Now let's start creating our first image using the Dockerfiles approach:
- Create a folder under C:\ on Windows Server Containers host machine for storing our image artifacts; let's call it learningwsc-chapter2.
- Create another folder within learning-chapter2/hellodocker, which will hold the artifacts for our first image.
- Open a text editor such as notepad and copy the following contents into the file:
FROM microsoft/windowsservercore
MAINTAINER srikanth@live.com
LABEL Description="IIS" Vendor=Microsoft" Version="10?
RUN powershell -Command Add-WindowsFeature Web-Server
COPY index.htm /inetpub/wwwroot/
EXPOSE 80
CMD [ "ping localhost -t" ]
- Save this file as Dockerfile under learningwsc-chapter2/hellodocker.
- Make sure the file is saved without any extension.
To save a file without any extensions...