In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the use of Docker example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Docker uses to write Dockerfile examples FROM java:latestMAINTAINER Gdboss "http://godap.com/"RUN mkdir-p / gdop & & chmod 777 / gdopRUN mkdir-p / gdop/lib & & chmod 777 / gdop/libRUN mkdir-p / gdop/logs & & chmod 777 / gdop/logsCOPY target/gdop.jar / gdop/COPY target/lib/ / gdop/libCOPY config/ / gdop/configCOPY / run.sh / gdop/WORKDIR / gdopCMD [" run.sh "]
Run.sh
#! / bin/bashjava-Dlog4j.configuration= "/ gdop/config/log4j.properties"-jar gdop.jar-c / gdop/config/gdop.properties to build docker image docker build-t gdboss.
Specific parameters can be viewed through docker-- help
Run the docker container
Docker run-name godapboss-p 9900 gdboss 9900-d
Check the container operation
Information about the container that docker ps is currently running
Docker ps-a view all container information
Enter inside the docker container
Docker exec-I-t godapboss / bin/bash
View container log
Docker logs godapboss
View docker information
Docker info
View docker status
Docker stats viewing container cpu and other information is equivalent to top
Pull the image
Docker pull xxx
Push image
Docker push xxx
Export
Docker export xxx-o / mnt/xxx.tar
Import
Docker import / mnt/xxx.tar xxx-bak
You need to set-workdir and the corresponding command line to run the run of import.
Copy
Docker cp xx.zip container:/dir/
Docker cp container:/dir/ / xx/
Thank you for reading this article carefully. I hope the article "sample Analysis of using Docker" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.