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

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.

主站蜘蛛池模板: 当阳市| 兴城市| 衡阳县| 靖西县| 乐亭县| 凭祥市| 方山县| 双牌县| 望都县| 诸城市| 定日县| 英吉沙县| 江门市| 进贤县| 昌乐县| 开封市| 大新县| 上饶市| 广汉市| 资源县| 通城县| 宣恩县| 武宁县| 阜宁县| 屏边| 抚顺市| 东乌珠穆沁旗| 蓝山县| 渝中区| 菏泽市| 黄龙县| 邵阳市| 宁晋县| 镇平县| 甘南县| 巧家县| 苍梧县| 甘泉县| 星座| 天等县| 沙坪坝区|