Hey !!
In This Repo We are going to Learn Some Docker, Docker-Compose And Kubernetes together
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
List of major frameworks/libraries used to bootstrap this project.
To get a local copy up and running follow these simple steps.
-
Note 1: Replace version with the latest version number from the Docker Engine - Community repository.
-
Note 2: For X86_64 Architecture CPUs use amd64 in place of arch if you are using a different architecture than x86_64, you can find the correct arch by running
uname -m
on your machine.-
-
Update Your apt
sudo apt-get update
-
Download Docker Desktop for Ubuntu
wget https://desktop.docker.com/linux/main/amd64/docker-desktop-<version>-<arch>.deb
-
Installing Docker Desktop
sudo apt install ./docker-desktop-<version>-<arch>.deb
-
-
-
Update Your Pacman
sudo pacman -Syu
-
Downloading and Installing Docker and Docker-Compose Plugin for Arch
sudo pacman -S docker docker-compose
-
-
-
Download Docker Desktop With This Command
Invoke-WebRequest https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe
-
Type Command Below For installing Docker Desktop
start /w "" "Docker Desktop Installer.exe" install
-
-
installing and setting up the app
-
Clone the repo
git clone https://github.com/msadeqsirjani/Navisite.git
-
Install ... packages
... install
For more examples, please refer to the Documentation
-
Choose a Web-Server image from Docker Hub (Like: Nginx, Apache, etc.)
- Nginx is the one we are going to use in this project.
- Downloading WebServer Image From Docker Hub
- Downloading Nginx Image From Docker Hub
-
Writing Dockerfile For WebServer That Do One of these Tasks :
-
Acting as Reverse Proxy for a simple application.
-
Hosting an HTML Page.
-
-
Note : First Task Can Have Extra Points For Architecture and Richer Configuration
-
WebServer must be able to host a Content of a Folder Outside of the Container
- Writing Dockerfile that can host a Content of a Folder Outside of the Container
-
Choosing a way of Configuring the WebServer (Like: copying in image, mounting a volume, etc.)
- ... is the one we are going to use in this project.
-
-
Choose a Database image from Docker Hub (Like: Elasticsearch, MySQL, MongoDB, etc.)
- PostgreSQL is the one we are going to use in this project.
- Downloading Database Image From Docker Hub
- Downloading PostgreSQL Image From Docker Hub
-
Note : The related image configuration must written in docker-compose.yml file that have these four features :
-
The Configuration file must be Stateful (Meaning that the data will be saved even if the container is removed)
-
Each container must use Limited amount of resources (Like: CPU, Memory, etc.)
-
For choosen database Define a separate username and password
-
Need to run automatically after each system restart.
- Downloading The Database Image From Docker Hub
- The Related image Configuration must write
-
-
By using Pervious Step Dockerfile do the build opration note that both images must run together
- Writing docker-compose.yml File
-
Push the built image to Docker Hub
- Pushing The Built Image To Docker Hub
- Putting Docker Hub Image Link In issue Phase 1
In this phase, we plan to launch a self-hosted version of kubernetes together. We suggest you minikube.
-
At first, as always, we apply the update command
sudo apt-get update
-
At first, as always, we apply the update command
sudo apt-get install curl
-
In continuation of the previous case, the binary installation files are downloaded from the domains with the http tag, and what is better is to enter the following command as well.
sudo apt-get install apt-transport-https
-
As you know, to install minikube, you must use the hypervisor feature and install a version of virtual box on your operating system. This can be done as follows
sudo apt install virtualbox virtualbox-ext-packs
-
In this step, we download the minikube installation binary files
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
-
In order to be able to apply the commands related to the execution of minikube, we must move the executable files to the following path.
sudo cp minikube-linux-amd64 /usr/local/bin/minikube
-
We give the necessary access to the executable files of minikube as follows.
sudo chmod 755 /usr/local/bin/minikube
-
Now we have installed minikube and we can enter the following command in the command line to check the correctness of the program installation.
minikube version
-
There are 3 ways to communicate with minikube. The most important and powerful method is to use command line commands or kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
With the above command, we download the kubectl binary installation files.
-
The necessary access to the kubectl executable is given as follows
chmod +x ./kubectl
-
We move the kubectl execution file to the execution path of other programs.
sudo mv ./kubectl /usr/local/bin/kubectl
-
We have now installed kubectl. We can make sure of the correct performance by executing the following command
kubectl version -o json
-
By running the following command, minikube will run on a virtualbox
minikube start
-
You can connect to minikube using kubectl using the following commands
kubectl config view
kubectl cluster-info
kubectl get nodes
-
At the end, you can get the necessary information from the latest status of minikube with the following command
minikube status
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Mohammad Sadeq Sirjani - @msadeqsirjani - m.sadeq.sirjani@gmail.com
Project Link: https://github.com/msadeqsirjani/Navisite