
下载最新版的docker-compose文件 (download compose file) $ sudo curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose 添加可执行权限 (change privilege) $ sudo chmod +x /usr/local/bin/docker-compose 测试安装结果 (test) $ docker-compose --version
version: "3" services: apisix: image: hellotalk/apisix restart: always container_name: test_api_gateway volumes: - ./apisix_log:/usr/local/apisix/logs - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro - ./apisix_conf/debug.yaml:/usr/local/apisix/conf/debug.yaml:ro #ports: # - "0.0.0.0:8080:9080/tcp" depends_on: - etcd #networks: # - apisix network_mode: host etcd: # if you are in the mainland China, please use Azure China mirror: # image: gcr.azk8s.cn/etcd-development/etcd:v3.3.12 image: hellotalk/etcd-dev command: /usr/local/bin/etcd --advertise-client-urls http://0.0.0.0:2379 --listen-client-urls http://0.0.0.0:2379 restart: always container_name: test_api_etcd volumes: - ./etcd_data:/etcd_data environment: ETCD_DATA_DIR: /etcd_data ports: - "2379:2379/tcp" networks: - apisix networks: apisix: driver: bridge
create subdir apisix_conf,apisix_log,etcd_conf,etcd_data in the same dir.
and config.yaml should be inside the apisix_conf dir
docker-compose up -d
config.yaml)(访问apisix的管理后台)visit http://YOURIP:YOURPOR/apisix/dashboard/
apisix: node_listen: 80 # APISIX 监听端口,可以根据需要去修改 node_ssl_listen: 443 enable_heartbeat: true enable_admin: true enable_debug: false enable_ipv6: true config_center: etcd # etcd: 用 etcd 来存储配置 # allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow # - 127.0.0.0/24 # If we don't set any IP list, then any IP access is allowed by default. # - "::/64" # port_admin: 9180 # use a separate port real_ip_header: "X-Real-IP" # http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header real_ip_from: # http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from - 127.0.0.1 - 'unix:' # Default token when use API to call for Admin API. # *NOTE*: Highly recommended to modify this value to protect APISIX's Admin API. # Disabling this configuration item means that the Admin API does not # require any authentication. admin_key: - name: "admin" key: edd1c9f034335f136f87ad84b625c8f1 role: admin # admin: manage all configuration data # viewer: only can view configuration data - name: "viewer" key: 4054f7cf07e344346cd3f287985e76a2 role: viewer router: http: 'radixtree_host_uri' # radixtree_uri: match route by uri(base on radixtree) ssl: 'radixtree_sni' # dns_resolver: # default DNS resolver, with disable IPv6 and enable local DNS - 114.114.114.114 - 223.5.5.5 - 1.1.1.1 - 8.8.8.8 dns_resolver_valid: 30 # valid time for dns result 30 seconds ssl: enable: true enable_http2: true listen_port: 9443 ssl_protocols: "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3" ssl_ciphers: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA" nginx_config: # config for render the template to genarate nginx.conf error_log: "logs/error.log" error_log_level: "warn" # warn,error event: worker_connections: 10620 http: access_log: "logs/access.log" keepalive_timeout: 60s # timeout during which a keep-alive client connection will stay open on the server side. client_header_timeout: 60s # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client client_body_timeout: 60s # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client send_timeout: 10s # timeout for transmitting a response to the client.then the connection is closed etcd: host: "http://127.0.0.1:2379" # etcd address prefix: "/apisix" # apisix configurations prefix timeout: 1 # 1 seconds plugins: # plugin list - example-plugin - limit-req - limit-count - limit-conn - key-auth - prometheus - node-status - jwt-auth - zipkin - ip-restriction - grpc-transcode - serverless-pre-function - serverless-post-function - openid-connect - proxy-rewrite stream_plugins: - mqtt-proxy
以下是 hellotalk/apisix 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。


探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务