📂
apisix-dashboard
  • 概述
  • FAQ
  • 更新日志
  • 部署
    • 源码
    • Docker
      • 手动构建
      • DockerHub
    • RPM
  • 指南
    • Route
      • 概述
      • 路由列表
      • 创建路由
      • 编辑路由
      • 删除路由
    • Upstream
      • 概述
      • 上游列表
      • 创建上游
      • 编辑上游
      • 删除上游
    • Service
      • 概述
      • 服务列表
      • 创建服务
      • 编辑服务
      • 删除服务
    • Consumer
      • 概述
      • 应用列表
      • 创建应用
      • 编辑应用
      • 删除应用
    • SSL
      • SSL 列表
      • 创建 SSL
      • 编辑 SSL
      • 删除 SSL
    • 全局插件
      • 插件列表
      • 配置插件
  • 最佳实践
    • API 全生命周期
      • API 版本管理
      • API 在线调试
      • API 上下线
      • API 分组管理
  • 附录
    • 版本兼容
    • 疑难排查
Powered by GitBook
On this page
  • Prerequisites
  • Build
  • Launch
  • Other

Was this helpful?

  1. 部署
  2. Docker

手动构建

PreviousDockerNextDockerHub

Last updated 4 years ago

Was this helpful?

To build the Dashboard with Docker, you simply download the Dockerfile file from the root directory to your device (no need to download all source codes) then follow this guide.

The manager-api and web will be included in this build guide product.

Prerequisites

Before using Docker to build images and start containers, make sure that the following dependencies are installed and running in your environment.

  1. 3.4.0+

Build

# Execute the build command in the directory where the Dockerfile is located (by default, the project root), specifying the tag manually.
$ docker build -t apisix-dashboard:$tag .

# For users in mainland China, the `ENABLE_PROXY` parameter can be provided to speed up module downloads.
$ docker build -t apisix-dashboard:$tag . --build-arg ENABLE_PROXY=true

# If you want to use the latest codes to build, you can specify the `APISIX_DASHBOARD_VERSION` parameter to `master`.
# This parameter can also be specified as branch name of a specific version, such as `v2.1.1`.
$ docker build -t apisix-dashboard:$tag . --build-arg APISIX_DASHBOARD_VERSION=master

Launch

  1. Preparing configuration files

Kindly note:

  • Only when conf.listen.host is 0.0.0.0 can the external network access the services within the container.

  • conf.etcd.endpoints must be able to access the etcd service within the container. For example: use host.docker.internal:2379 so that the container can access etcd on the host network.

  • Launch the Dashboard

# /path/to/conf.yaml Requires an absolute path pointing to the configuration file mentioned above.
$ docker run -d -p 9000:9000 -v /path/to/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml --name apisix-dashboard apisix-dashboard:$tag
  1. Check if the container started successfully

$ docker ps -a

If the container apisix-dashboard is ok, visit http://127.0.0.1:9000 to use the dashboard with GUI, where the default username and password are admin.

  1. Stop the Dashboard

$ docker stop apisix-dashboard

Other

  1. Caching is not recommended when building a image multiple times.

$ docker build -t apisix-dashboard:$tag . --no-cache=true

Before starting the container, the configuration file conf.yaml needs to be prepared inside the host to override the default inside the container.

Docker
etcd
configuration file