Posts

Showing posts from July, 2021

Docker

Image
Docker container Vs Virtual Machine Docker Architecture: Workflow: Basic Concepts - Registry - Repository - Tag  - Image - Containers. Registry/ Repository : https://hub.docker.com is a public registry and it contains many repositories. For Eg:   https://hub.docker.com/r/ in28min/todo-rest-api-h2 (Highlighted one is the repository). Tags : In the repository, there will a different versions of an image.      For Eg:       docker run in28min/todo-rest-api-h2: 1.0.0.RELEASE Image : A static template - A set of bytes Container : Running version of your image ========================================================================== Install docker :  https://docs.docker.com/desktop/  ========================================================================== Docker commands Run a docker image :     docker run -p 5000:5000 in28min/todo-rest-api-h2:1.0.0.RELEASE          -p 5000:5000 => {host port} : {container port} if the image is not available in local, it will pull from repository De

Data Structure

Image
  Stack:   A Stack is a Last In First Out (LIFO) data structure. It supports two basic operations called  push  and  pop . The  push  operation adds an element at the top of the stack, and the  pop  operation removes an element from the top of the stack. The following are some common operations implemented on the stack: push():  When we insert an element in a stack then the operation is known as a push. If the stack is full then the overflow condition occurs. pop():  When we delete an element from the stack, the operation is known as a pop. If the stack is empty means that no element exists in the stack, this state is known as an underflow state. isEmpty():  It determines whether the stack is empty or not. isFull():  It determines whether the stack is full or not.' peek():  It returns the element at the given position. count():  It returns the total number of elements available in a stack. change():  It changes the element at the given position. display():  It prints all the elemen

Steps to Add local Project to github

1. Create a new repository on GitHub. In Terminal, change the current working directory to your local project. (You can open Git bash CLI ) 2. Initialize the local directory as a Git repository. git init 3. Add the files to your new local repository git add . 4. Commit the files that you have staged in your local repository. git commit -m 'commit message' 5. Copy the remote repository URL field from your GitHub repository For eg: https://github.com/vthangar0202/springboot_jpa_h2.git 6. In Terminal, add the URL for the remote repository where your local repository will be pushed. git remote add origin <remote repository URL> 7. Sets the new remote git remote -v 8. Push the changes in your local repository to GitHub. (You have to give git hub login credentials) git push origin master