惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
V
Vulnerabilities – Threatpost
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
B
Blog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
H
Hacker News: Front Page
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园_首页
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Y
Y Combinator Blog
W
WeLiveSecurity
N
News and Events Feed by Topic
F
Fortinet All Blogs
PCI Perspectives
PCI Perspectives
WordPress大学
WordPress大学
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Recent Announcements
Recent Announcements
Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
Hacker News: Ask HN
Hacker News: Ask HN
爱范儿
爱范儿
腾讯CDC
Last Week in AI
Last Week in AI
月光博客
月光博客
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Help Net Security
Help Net Security
V
V2EX
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
H
Heimdal Security Blog
L
LINUX DO - 最新话题
GbyAI
GbyAI
The Hacker News
The Hacker News
罗磊的独立博客
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 【当耐特】
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V2EX - 技术
V2EX - 技术
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
O
OpenAI News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - 无心々菜

VUE2 - Geoserver打印矢量PDF地图 - 在VUE2中的应用 地图 - Geoserver打印矢量PDF地图 Docker - 离线+无root环境安装 docker-rootless 运维 - 哪吒监控 Postgres 数据库在docker环境下分布式部署(arm64框架) Postgres 数据库在docker环境下分布式部署 Https - 配置方案 OpenObserver - 系统接口监控 VUE3 - Docker部署 + traefik反代 VUE2 - Docker部署 + traefik反代 高斯DB 数据库的安装 NETCORE - 使用 EFCORE 调用 高斯DB数据库 JMeter - 压力测试 NETCORE - IdentityServer4 多节点部署 NETCORE - IdentityServer4 相关文档 .NET框架 - NETCORE + API + EF(DBFirst) + PostgresSql Docker部署martin 矢量切片服务器 Postgres 数据库的安装 NETCORE - 调用 RUSTFS Docker - 部署 RustFS 对像存储 Docker - 使用 Docker Secrets 敏感数据传输 Docker - 部署 Consul KV 统一管理所有项目的配置 Docker - 部署 HashiCorp Vault 开源密钥管理工具 kong 网关下集成 Consul服务注册与发现 Docker 部署 kong 网关 Docker - 部署Consul 新
Docker 部署 APISIX + etcd
无心々菜 · 2026-01-27 · via 博客园 - 无心々菜

Docker 部署 APISIX + etcd

官网:https://apisix.apache.org/

一. 拉取镜像

    docker pull apache/apisix:latest

    docker inspect apache/apisix:latest | findstr "Architecture"

    docker run --rm apache/apisix:latest apisix version (查看版本,这里使用的是3.14.1)

    docker pull milvusdb/etcd:3.5.25-r1

    docker inspect milvusdb/etcd:3.5.25-r1 | findstr "Architecture"

二. 创建网络

docker network create apisix-net

docker network ls

image

三. 启动容器

1. 启动etcd

docker-compose.yml

  etcd:
    image: milvusdb/etcd:3.5.25-r1
    container_name: etcd
    restart: always
    environment:
      - ALLOW_NONE_AUTHENTICATION=yes
      - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
      - ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
    ports:
      - "2379:2379"
    volumes:
      - D:\DockerMapping\etcd:/bitnami/etcd/data
    networks:
      - apisix-net

启动容器

docker-compose up -d etcd

测试:

curl http://localhost:2379/version
  返回:{"etcdserver":"3.5.25","etcdcluster":"3.5.0"}

docker exec etcd etcdctl endpoint health

  返回:127.0.0.1:2379 is healthy: successfully committed proposal: took = 6.166015ms

测试,写入数据

curl -L http://localhost:2379/v3/kv/put -X POST -H "Content-Type: application/json" -d "{\"key\":\"Zm9v\",\"value\":\"YmFy\"}"

image

2. 启动 apisix


  apisix:
    image: apache/apisix:latest
    container_name: apisix
    depends_on:
      - etcd
    restart: always
    volumes:
      - D:\DockerMapping\apisix\conf\config.yaml:/usr/local/apisix/conf/config.yaml
    ports:
      - "9080:9080"   # 业务流量
      - "127.0.0.1:9180:9180"  # Admin 只本机
    networks:
      - apisix-net

创建 文件:D:\DockerMapping\apisix\conf\config.yaml

apisix:
  node_listen: 9080

deployment:
  role: traditional
  role_traditional:
    config_provider: etcd
  etcd:
    host:
      - "http://etcd:2379"
      
  admin:                            # 必须添加这部分
    enable_admin_ui: true
    allow_admin:                    # 允许访问admin API的IP段
      - 0.0.0.0/0                   # 允许所有IP(生产环境应限制)
    admin_key:                      # 管理员密钥
      - name: "admin"               # 密钥名称
        key: "edd1c9f034335f136f87ad84b625c8f1"  # 密钥值(APISIX默认key)
        role: admin                 # 角色

  consul:
    servers:
      - "http://consul:8500"   # 确保consul与apisix在同一网络,否则使用IP地址

启动容器

docker-compose up -d apisix

测试:

curl -i http://127.0.0.1:9180/apisix/admin/routes -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1"

image

访问浏览器:

http://localhost:9180/ui/

image

参考:https://apisix.apache.org/docs/apisix/next/dashboard/

使用:

end.