- Hands-On Kubernetes on Windows
- Piotr Tylenda
- 258字
- 2021-06-24 16:54:04
Creating a GitHub repository
If you don't have a GitHub account, you can create one for free at https://github.com/join. In this example, we will create a dedicated public repository called nginx-demo-index in the hands-on-kubernetes-on-windows organization. Let's get started:
- Navigate to https://github.com/ and use the + sign to create a new repository:
Hosting an organization is not required; you can just use your own personal namespace. The repository is intended to only contain the application source code (in our case, just a static index.html web page) and the Dockerfile that's required to build the image, which aligns with the suggested best practices for Docker development.
- After you have created the repository, we can push some source code for the image. You can find the source code for our minimalistic Docker image for hosting a static web page using nginx in this book's GitHub repository: https://github.com/PacktPublishing/Hands-On-Kubernetes-on-Windows/tree/master/Chapter03/02_nginx-demo-index.
- In order to clone the newly created repository, in PowerShell, navigate to the directory where you would like to have the repository and use the git clone command:
git clone https://github.com/<userName>/<repositoryName>.git
- Copy all the required source files to the repository and perform a push using the git push command:
git add -A
git commit -am "Docker image source code"
git push -u origin master
- At this point, you should be able to see the files in the repository when you navigate to GitHub web page, for example, https://github.com/hands-on-kubernetes-on-windows/nginx-demo-index:
The next step is to create the actual Docker Hub repository and configure autobuild. Let's proceed!
推薦閱讀
- 黑客攻防從入門到精通(實戰秘笈版)
- Web前端開發技術:HTML、CSS、JavaScript(第3版)
- The Android Game Developer's Handbook
- 密碼學原理與Java實現
- LabVIEW程序設計基礎與應用
- JavaFX Essentials
- 三維圖形化C++趣味編程
- JavaScript動態網頁開發詳解
- D3.js By Example
- Scala Data Analysis Cookbook
- Spring MVC+MyBatis開發從入門到項目實踐(超值版)
- Hadoop大數據分析技術
- PHP+MySQL動態網站開發從入門到精通(視頻教學版)
- Java EE Web應用開發基礎
- Oracle Data Guard 11gR2 Administration Beginner's Guide