In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
In the previous article: one of the getting started series on Docker: running a specified web application in a Docker container
We have successfully deployed a web application we developed locally to run in a Docker container.
This article will show you how to make a Docker image that contains the web application.
After the image is made, any other user on the Internet can easily download and run your image.
Create a new folder jerry-build, put your web application in this folder, and my web application in the folder webapp. Create a new file dockerfile in the jerry-build folder:
This dockerfile is very simple, just three lines:
FROM nginx:stableCOPY webapp/ / usr/share/nginx/html/webapp/RUN ls-la / usr/share/nginx/html/webapp*
We carry out the order docker build.
This command successfully typed all the files in the webapp folder that contains our web application into the nginx image:
Use the option-t to specify the name of the generated image jerry-nginx-image:
After the image is generated successfully, you can use the docker run command to execute the image:
Docker run-d-p 1082 80 jerry-nginx-image:1.0
Using the command docker images, you can see the image we just made, the size is 109MB.
The next article in this series will show you how to publish this finished image to Docker hub.
For more original Jerry articles, please follow the official account "Wang Zixi":
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.