Sign inSign up

abelgaxiola/pima

By abelgaxiola

•Updated over 9 years ago

Image for development and testing purposes.

Image
0

172

abelgaxiola/pima repository overview

⁠Created using microsoft/iis:nanoserver

⁠Image size 1.15 GB

Create a folder to generate the Docker image. Create a Docker file inside that folder using the Docker file contents listed below. Create a sub-folder and name it websrc. Create or copy html, css, and javascript files inside the websrc sub-folder; this files are the ones that will be copied into the image -- make sure to include an index.html file.

⁠Contents of the Dockerfile used:

# Indicates that the nanoserver image will be used as the base image
FROM microsoft/iis:nanoserver

# Metadata indicating an image maintainer
MAINTAINER @abelgaxiola

# Delete the default website files
RUN powershell -Command Remove-Item -Recurse C:\inetpub\wwwroot\*

# Copy the contents of websrc folder into the default website folder
COPY ./websrc c:/inetpub/wwwroot

# Sets a command or process for each time a container is run from the new image
CMD [ "CMD" ]

Docker commands used:

docker build -t nano-iis .
docker run -d --name nano-iis -p 80:80 nano-iis
docker inspect --format '{{ .NetworkSettings.Networks.nat.IPAddress }}' nano-iis

The last command return the IP Address of the running image.

The website can now be viewed and interacted with by copying the IP Address into a web browser's address bar

Tag summary

Content type

Image

Digest

Size

364.9 MB

Last updated

over 9 years ago

docker pull abelgaxiola/pima:nano-iis