-
Notifications
You must be signed in to change notification settings - Fork 232
Expand file tree
/
Copy pathREADME
More file actions
35 lines (20 loc) · 1.14 KB
/
Copy pathREADME
File metadata and controls
35 lines (20 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Welcome to the DevOps test repository for Maven projects
************************************************************
To use this, your system (Centos 7) should have below tools installed:
git //you can use "yum install git -y" for this
maven //you can use "yum install maven -y" for this
jenkins //follow the installation guideline at https://www.jenkins.io/doc/book/installing/#red-hat-centos
docker // you can install docker with "yum install -y docker-ce docker-ce-cli containerd.io"
post installing you can fecth the code from github account by clone the repo https://github.com/techlanders/Maven-Project.git
git clone https://github.com/techlanders/Maven-Project.git
use maven to clean the previous builds and package the war file
mvn clean
mvn package
check the outputs in target directory structure and war file with name devops.war
build the docker image with docker build command ( you can see dockerfile in present working directory)
docker build -t image-name:version .
Run a container from the image
docker run -d -p 8080:8080 --name mycontainer image-name:version
Check your system IP in browser :
IP:8080/devops
Lab completed**