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

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.

主站蜘蛛池模板: 张家港市| 江川县| 青神县| 济阳县| 凌海市| 泽库县| 中江县| 都安| 宁明县| 上饶市| 新疆| 大城县| 柞水县| 绍兴市| 惠来县| 禄劝| 凭祥市| 永仁县| 西青区| 德化县| 双流县| 大荔县| 巫山县| 丽江市| 扶余县| 茶陵县| 米林县| 乌兰县| 霍城县| 时尚| 澜沧| 赤城县| 革吉县| 图木舒克市| 调兵山市| 通化市| 望都县| 荣成市| 金门县| 北川| 桃源县|