官术网_书友最值得收藏!

Creating a sample HTML web page

We will start creating our Docker image by creating a minimalistic HTML "Hello World!" web page. This step mimics implementing an application without any containerization and is a common scenario in application development: you are running a non-containerized application and then you move it to a Docker container.

You can also use the files from this book's GitHub repository to do this, available from:  https://github.com/PacktPublishing/Hands-On-Kubernetes-on-Windows/tree/master/Chapter01/01_docker-helloworld-iis.

Add a new file in Visual Studio Code in your workspace using the Ctrl + N shortcut or by navigating to File > New File. Use the following sample HTML code in the new file:

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World from Windows container!</h1>
</body>
</html>

Save the file (using Ctrl + S) as index.html in your workspace.

Let's proceed with creating the Dockerfile itself.

主站蜘蛛池模板: 沾益县| 名山县| 汶上县| 江华| 抚顺县| 温宿县| 凤台县| 舞钢市| 招远市| 蒙山县| 韶山市| 博罗县| 安宁市| 黑山县| 惠水县| 青冈县| 昌黎县| 鹿邑县| 江源县| 防城港市| 昭平县| 太和县| 华宁县| 农安县| 澄城县| 云林县| 沙雅县| 汝阳县| 蓬莱市| 辰溪县| 滨海县| 徐闻县| 宁陵县| 吉木萨尔县| 镶黄旗| 且末县| 浦县| 德保县| 泾阳县| 新竹县| 静安区|