Share via


Nano Server: Basic Windows container deployment

In this example we will be using WordPress on IIS. The specific windows technology demonstrated here is how easy this is to setup in a separate container.

The Nano Server has:

IIS, PHP, MySQL, & WordPress

Let’s Start

To run Docker just type:

docker run -p 80:80 --name wordpress -it -d nanoserver/iis-mysql-php-wordpress

The command above will pull the file from the server. It will take some time to download and extract but it will be worth it in the end!

Let’s see what’s running

First, see all downloaded images, running or not:

Docker images

Show running containers:

docker ps -a -f status=running

Show container IP:

docker exec -it wordpress ipconfig

And viewing the website:

Now you can access the WordPress site via a browser using container IP.

(example: http://192.168.15.100/wordpress )

Now on the WordPress site you will configure database settings and such.

Additional options:

When you started the container you were given the ID, you can get it again here:

Show container id:

docker inspect -f="{{.Id}}" wordpress

You also can access the container via PowerShell:

Enter-PSSession <containerID>

Run a command inside the container:

docker exec -it wordpress <command>

We hope this article provided you with a brief example of how to get a basic container from Docker hub up and running.