Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ RUN apt update
RUN apt install git -y
RUN rm -rf /var/lib/apt/lists/*
RUN rm -rf /usr/local/apache2/htdocs/*
RUN git clone https://github.com/akshu20791/apachewebsite/ /usr/local/apache2/htdocs/
RUN git clone https://github.com/coshik/apachewebsite/ /usr/local/apache2/htdocs/
EXPOSE 80
CMD ["httpd-foreground"]
42 changes: 42 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
pipeline {
agent any
stages{
stage('git cloned'){
steps{
git url:'https://github.com/coshik/apachewebsite/', branch: "master"

}
}
stage('Build docker image'){
steps{
script{
sh 'docker build -t coshik/akshatnewimg6july:v1 .'
sh 'docker images'
}
}
}
stage('Docker login') {
steps {
withCredentials([usernamePassword(credentialsId: 'dockerhub-pwd', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
sh "echo $PASS | docker login -u $USER --password-stdin"
sh 'docker push coshik/akshatnewimg6july:v1'
}
}
}

stage('Deploy') {
steps {
script {
def dockerrm = 'sudo docker rm -f My-first-containe2211 || true'
def dockerCmd = 'sudo docker run -itd --name My-first-containe2211 -p 8083:80 coshik/akshatnewimg6july:v1'
sshagent(['sshkeypair']) {
//chnage the private ip in below code
// sh "docker run -itd --name My-first-containe2111 -p 8083:80 akshu20791/2febimg:v1"
sh "ssh -o StrictHostKeyChecking=no ubuntu@172.31.13.249 ${dockerrm}"
sh "ssh -o StrictHostKeyChecking=no ubuntu@172.31.13.249 ${dockerCmd}"
}
}
}
}
}
}
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ <h2>Request a call back</h2>
<div class="follow">
<h3>Follow Us</h3>
<ul>
<li><a href="#"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></i></a></li>
<li><a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></i></a></li>
<li><a href="#"><i class="fa fa-linkedin-square" aria-hidden="true"></i></i></a></li>
<li><a href="https://www.facebook.com"><i class="fa fa-facebook" aria-hidden="false"></i></a></li>
<li><a href="https://www.twitter.com"><i class="fa fa-twitter" aria-hidden="true"></i></i></a></li>
<li><a href="https://www.instagram.com"><i class="fa fa-instagram" aria-hidden="false"></i></i></a></li>
<li><a href="https://www.linkedin.com"><i class="fa fa-linkedin-square" aria-hidden="true"></i></i></a></li>
</ul>
</div>
</div>
Expand All @@ -467,7 +467,7 @@ <h3>Follow Us</h3>
<div class="container">
<div class="row">
<div class="col-md-12">
<p>Copyright 2019 All Right Reserved By <a href="https://html.design/">Free html Templates</a></p>
<p>Copyright 2025 All Right Reserved By <a href="https://aka.ms/sspr">Your Mom</a></p>
</div>
</div>
</div>
Expand Down