Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Commit 37fb7fe

Browse files
committed
Updated readme
Signed-off-by: Elton Stoneman <elton@sixeyed.com>
1 parent 5c8b53d commit 37fb7fe

File tree

1 file changed

+33
-28
lines changed

1 file changed

+33
-28
lines changed

README.rst renamed to README.md

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,41 @@
1-
Introduction
2-
=============
1+
# Image2Docker
32

4-
`Image2Docker` is a PowerShell module which ports existing Windows application workloads from virtual machines to Docker images. It supports multiple application types, but the initial focus is on IIS. You can use `Image2Docker` to extract ASP.NET websites from a VM, so you can run them in a Docker container with no application changes.
3+
`Image2Docker` is a PowerShell module which ports existing Windows application workloads from virtual machines to Docker images. It supports multiple application types, but the initial focus is on IIS. You can use `Image2Docker` to extract [ASP.NET websites from a VM](https://blog.docker.com/2016/12/convert-asp-net-web-servers-docker-image2docker/), so you can run them in a Docker container with no application changes.
54

6-
This project aims to provide a framework to simplify the creation of Dockerfiles for Microsoft Windows Server Hyper-V Container
5+
## Introduction
6+
7+
This project aims to provide a framework to simplify the creation of Dockerfiles for Windows Docker
78
images, based upon analysis of existing WIM or VHDX image files.
89

9-
The Microsoft Windows Server 2016 platform introduces new capabilities for containerizing applications.
10+
Microsoft Windows 10 and Windows Server 2016 introduce new capabilities for containerizing applications.
1011
There are two types of container formats supported on the Microsoft Windows platform:
1112

1213
- **Hyper-V Containers** - Containers with a dedicated kernel and stronger isolation from other containers
13-
- **Windows Containers** - application isolation using process and namespace isolation, and a shared kernel with the container host
14+
- **Windows Server Containers** - application isolation using process and namespace isolation, and a shared kernel with the container host
1415

15-
Prerequisites
16-
=============
16+
## Prerequisites
1717

18-
Windows Server 2016, or Windows 10 with the Anniversary Update is required on the system that is using this module.
18+
Windows Server 2016, or Windows 10 with the Anniversary Update is required to use `Image2Docker`.
1919

20-
The module generates a [Dockerfile](https://docs.docker.com/engine/reference/builder/) which you can build into a Docker image. The system running the `ConvertTo-Dockerfile` command does not need Docker installed, but you will need [Docker setup on Windows](https://github.com/docker/labs/blob/master/windows/windows-containers/Setup.md) to build images and run containers.
20+
`Image2Docker` generates a [Dockerfile](https://docs.docker.com/engine/reference/builder/) which you can build into a Docker image. The system running the `ConvertTo-Dockerfile` command does not need Docker installed, but you will need [Docker setup on Windows](https://github.com/docker/labs/blob/master/windows/windows-containers/Setup.md) to build images and run containers.
2121

22-
Installation
23-
=============
22+
## Installation
2423

2524
Installing this PowerShell module from the PowerShell Gallery is very easy. Simply invoke ``Install-Module -Name Image2Docker`` in an administrative prompt.
2625
If you receive any errors, please validate the presence of the ``PowerShellGet`` module by running this command: ``Get-Command -Name PowerShellGet -ListAvailable``.
2726
You can also validate the presence of the ``Install-Module`` command by running: ``Get-Command -Module PowerShellGet -Name Install-Module``.
2827
If the ``PowerShellGet`` module or the ``Install-Module`` commands are not accessible, you may not be running a supported version of PowerShell.
2928
Make sure that you are running PowerShell 5.0 or later on a Windows 10 client operating system.
3029

31-
Usage
32-
=============
30+
## Usage
3331

3432
After installing the ``Image2Docker`` PowerShell module, you will need one or more valid ``.vhdx`` or ``.wim`` files (the "source image").
3533
To perform a scan of a valid VHDX or WIM image file, simply call the ``ConvertTo-Dockerfile`` command and specify the ``-ImagePath`` parameter, passing in the fully-qualified filesystem path to the source image.
3634

37-
::
38-
39-
### Perform scan of Windows source image
35+
```PowerShell
36+
# Perform scan of Windows source image
4037
ConvertTo-Dockerfile -ImagePath c:\docker\myimage.wim
38+
```
4139

4240
To improve performance of the image scan, you may also specify the artifacts that will be discovered within the image.
4341
This avoids the performance hit by preventing scanning for artifacts that are intentionally excluded from the scanning process.
@@ -46,19 +44,27 @@ Once you have identified one or more artifacts that you would like to scan for,
4644

4745
Example:
4846

49-
::
50-
51-
### List out supported artifacts
47+
```PowerShell
48+
# List out supported artifacts
5249
Get-WindowsArtifact
5350
54-
### Perform scan and Dockerfile generation
51+
# Perform scan and Dockerfile generation
5552
ConvertTo-Dockerfile -ImagePath c:\docker\myimage.vhdx -Artifact IIS, Apache
5653
57-
### Extract a single wesbite from an IIS virtual machine
54+
# Extract a single wesbite from an IIS virtual machine
5855
ConvertTo-Dockerfile -ImagePath c:\vms\iis.vhd -Artifact IIS -ArtifactParam aspnet-webapi
56+
```
5957

60-
Artifacts
61-
=============
58+
To generate Dockerfile from a VHD, build a Docker image and run a container:
59+
60+
```PowerShell
61+
ConvertTo-Dockerfile -ImagePath c:\vms\iis.vhd -Artifact IIS -ArtifactParam aspnet-webapi -OutputPath c:\i2d2
62+
cd c:\i2d2
63+
docker build -t aspnet-webapi .
64+
docker run -d -p 80:80 aspnet-webapi
65+
```
66+
67+
## Artifacts
6268

6369
This project supports discovery of custom artifacts.
6470
Each artifact is represented by a folder that is contained within the ``.\Functions\Private\Artifacts`` subdirectory, containing at least two PowerShell script files that contain :
@@ -72,8 +78,7 @@ You can also include any files within the Artifact directory that may be used to
7278

7379
You can add your own discovery artifacts to this project, by issuing a pull request. If you don't wish to share the artifacts publicly, you can simply place them into the module's ``.\Functions\Private\Artifacts`` directory on each system that will perform image scans.
7480

75-
Supported Artifacts
76-
===================
81+
## Supported Artifacts
7782

7883
This project currently supports discovery of the following artifacts:
7984

@@ -87,8 +92,8 @@ This project currently supports discovery of the following artifacts:
8792
- Microsoft SQL Server instances
8893
- Apache Web Server
8994

90-
Known Issues
91-
=============
95+
96+
### Known Issues
9297

9398
1. Dism Error: 0x8000000a
9499
------------------------------------

0 commit comments

Comments
 (0)