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

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.

主站蜘蛛池模板: 通榆县| 宁强县| 启东市| 山东省| 辛集市| 海口市| 舟曲县| 阜新市| 青冈县| 宁国市| 常宁市| 滕州市| 曲水县| 延吉市| 防城港市| 抚顺县| 中牟县| 陆良县| 屏山县| 衢州市| 射阳县| 沁水县| 江华| 高清| 同心县| 四会市| 诸暨市| 太原市| 怀化市| 苏尼特左旗| 黎城县| 聊城市| 鄂伦春自治旗| 威海市| 丽水市| 聂拉木县| 镇赉县| 宝山区| 高陵县| 全椒县| 甘孜县|