Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure nacos in Docker

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

It is believed that many inexperienced people have no idea about how to configure nacos in Docker. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Text

Pull the image to the local docker

Docker pull nacos/nacos-server

Create a new nacos container

Docker run-- env MODE=standalone-- name nacos- d-p 8848 nacos/nacos-server

Parameter env is the environment in which the container is located. Here, it refers to the creation of a stand-alone version of nacos.

Create a new database for nodes and data preservation

Create database nacos_config

Where the database name is customized

You can copy the import script to the official website or use the script I uploaded. The extraction code is jm6z.

Modify the configuration file application.properties of nacos in conf

The main changes are as follows:

Db.url.0 db.url.1 db.user db.password

Since I am mainly used for testing, I did not set up the master-slave database and commented on db.url.1

Verify that the browser accesses http://ip/nacos/index.html, and the account password is nacos, and you can see the main interface.

After the above six steps, nacos can be used normally.

After reading the above, have you mastered how to configure nacos in Docker? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report