hostnamectl set-hostname server1.example.com
All the code which jenkins is pull will be available on /var/lib/jenkins/workspace dir
To extra any tar file tar -xvzf file-name.tar
To rename mv apache-8.9.3-maven to maven use mv apache-maven-3.8.8 maven
To find a file in linux find / -name jvm
Ex: find / -name java-11*
use init 6 to restart the instance
To start the docker at runtime use chk config
docker run -d --name tomcat-containier -p 8081:8080 tomcat Here 8081 is the outside or external or hostmachine port and 8080 is the container port of tomcat
su dockeradmin For switch usering in linux
chown -R dockeradmin:dockeradmin docker To Change owenership, Here dockeradmin is the username and docker is dir name
docker container prune To delete all the stopped containers
docker image prune -a To delete all images
git commit -am "updates-index-page.jsp" Use it everytime we don't need to (add . - git add .) instead use this command add and commit at same time
- We are using centos os as base image
- and we need jave to run tomcat
- and to create directory use mkdir
- we want to go to tomcat dir use WORKDIR
- Here to donwload files we use wget or add, if we use RUN then we must mention wget, and if we use ADD then no need to mention anything just ADD url-link
FROM tomcat:latest
RUN cp -R /usr/local/tomcat/webapps.dist/* /usr/local/tomcat/webapps
To run tomat without issue (403 - after updating the version of tomcat).The above dockerfile is customized and it works without error












