Use below command to create a container with current directory mounted to container, any changes you perform in current directory will reflected inside the container as well docker container run -it -p 5000:5000 -e FLASK_APP=app.py -e FLASK_DEBUG=1 –rm –name web1 -v $PWD:/app web1 -e =execute command in Docker -p = …
Tag image <dockerhub-username>/web with web1 docker image tag <dockerhub-username>/web1 web1 Remove docker image with <dockerhub-username>/web1 docker image rm <dockerhub-username>/web1 Run your docker image, check in browser by putting Public IP followed port 5000 docker container run -it -p 5000:5000 -e FLASK_APP=app.py web1 -e =execute command in Docker -p = Define …
Login to docker hub using docker login Prepare docker image to push to docker hub tagging repo name and version docker image tag web1 <dockerhub-username>/web1:latest Check the tagged image docker image ls Push the image to docker hub docker image push <dockerhub-username>/web1 Remove the docker image which you pushed to …
Lets create some application files, assuming we will be working with a Python application Create python app file vim app.py from flask import Flask app = Flask(__name__) @app.route(‘/’) def counter(): return ‘0’ save the file ESC + wq! Create python app dependency definition file vim requirements.txt Flask==0.12 save the file …
Create EC2 with Amazon Linux AMI Login to your EC2 with PuTTY Do an update of Amzon Linux sudo yum update Now for installing docker run below command: sudo yum install -y docker Give permission sudo usermod -a -G docker ec2-user Start Docker Service sudo service docker start Run below …
Create a project directory mkdir pythonapp Initialize Git git init Create a branch called as production git checkout -b production Create some file to be committed echo “This is a python app” > app.py echo “flask” > requirements.txt Add and commit the changes git add . git commit -m “Production …
Go to your project directory or git repository Lets create a branch git checkout -b development This command will create a development and copy all files from master branch List of all branch git branch Switch across branch git checkout master Now lets switch back to development branch git checkout …
Inside your project directory or git repository let’s say you have a file named as password.txt. Now. let’s say that you don’t want to commit this file or you don’t want to take snapshot of this file whenever you are doing git commit, well you can ignore this file from …
In last lab we created a GitHub repository In this lab will push the changes to that Github repository Copy the Github repository URL Now open command prompt and run following command git remote add origin <url-copied-from-step-3> Now we will push the changes to Github git push origin master Let’s …
Create a repository on GitHub go to github.com Log into your account Click on new repository Enter the repository name Keep the repository public for now Then finally click on create repository
In last lab be created two commits inside repository In this lab we will revert back to an older commit To revert back to an older commit git checkout <commit-id-1> You can put any commit ID which you want to be reverted too
In last lab we did two commits to our git repository Let’s look at those two commits git log Let’s compare the difference between these two commits git diff <commit-id-1> <commit-id-2> Using git diff command followed by the commit IDs you can compare the differences between the files which has …
In last lab we initiated or created a git repository In this lab we will track the changes are done to the files inside the project folder Will do get commit will do a git add first which will basically add the changes inside a staging area git add . …
Open command prompt or terminal Let’s create a project directory mkdir pythonapp Let’s get inside the project directory cd pythonapp Now, let’s read a sample file echo “this is a Pythonapp” > app.py And now, let’s initialize local git repository git init To checking what’s being tracked by git git …
Remove old git sudo yum -y remove git sudo yum -y remove git-* Add End Point CentOS 7 repo sudo yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm Once repository is added, install Git 2.x on CentOS 7: sudo yum install git Check git version after installing git2u-all package git –version
Login to dev.azure.com Select your Project Then select Repos > New repository Enter the repos name and lets not initialize any readme file That’s it this creates your Azure Repos and now with git remote you can push code to this repo
To get Ansible for CentOS 7, first ensure that the CentOS 7 EPEL repository is installed: sudo yum install epel-release Once the repository is installed, install Ansible with yum: sudo yum install ansible
Query a public dataset In the left pane, click ADD DATA > Explore public datasets. In the search box, type USA Names then press ENTER. Click on the USA Names tile you see in the search results. Click View dataset BigQuery opens in a new browser tab. The project bigquery-public-data …