In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
I am using the base image of ubuntu14.04, and I have configured the installation package of ant,tomcat,jdk in the base image. I will not repeat the details here.
Create a Dockerfile file in the / tmp/ directory:
Touch Dockerfile
Vi Dockerfile
Here is the Dockerfile file I wrote
Which image is the first line of FROM based on
The second line is the contact information.
RUN is a command that runs inside Dockerfile
ENV is used to configure environment variables
CMD is the command that is executed after the build, where tomcat is started
EXPOSE 8080 this is the port required by tomcat
Save these after writing, and then execute the following command to build
Docker build-t {name}: {tag}. Where-t names the image, tag is the tag, followed by a. Which means to find Dockerfile from the current directory
In the figure above, you can see that dockerfile is following the command steps. Let's run docker images again to see the built image.
Now let's activate this mirror image.
Docker run-d-- name jenkins-p 80 home/jenkins_home1:/home/jenkins_home1 jenkins:u3 8080-v / home/jenkins_home1:/home/jenkins_home1 jenkins:u3-p is to map ports from 8080 to 80
Check the health status and find that the jenkins service is up and running on port 80.
Page launches jenkins
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.