In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, Xiaobian will bring you about how to modify the configuration file of Docker container. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.
1. Entering the container
docker run [option] image name [command passed into boot container]
Common optional parameters:
-i means to run the container in interactive mode
-t indicates that the container will enter its command line after starting. After adding these two parameters, the container creation can log in. i. e. assign a dummy terminal.
--name Name the container you created
-v represents directory mapping relationship (the former is host directory, the latter is mapped to the directory on the host, i.e. host directory: directory in container), you can use multiple-v to do multiple directory or file mapping. Note: It's best to map directories, make changes on the host, and then share them to containers.
-d Add the-d parameter after run, and a daemon container will be created to run in the background (so that the container will not automatically log in after creation, if only add-i -t two parameters, it will automatically enter the container after creation).
-p indicates port mapping, the former is host port, the latter is mapped port within container. Multiple port mappings can be done using multiple-p
-e Sets environment variables for containers
--network=host means mapping the network environment of the host to the container, and the network of the container is the same as that of the host
Second, find the configuration file
#Display file ls results as follows: LICENSE.txt README.textile config lib modulesNOTICE.txt bin data logs plugins #Go to configuration folder cd config #Display file ls results as follows: elasticsearch.keystore ingest-geoip log4j2.properties roles.yml users_roleselasticsearch.yml jvm.options role_mapping.yml users #Modify the configuration file vi elasticsearch.yml
When using docker container, it is possible that Vi is not installed, install Vi:apt-get install vim, if prompted: Unable to locate package vim, you need to type: apt-get update, and then type the command: apt-get install vim after the update is completed.
The above is how to modify the configuration file of Docker container shared by Xiaobian for everyone. If you happen to have similar doubts, you may wish to refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.
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.