NOTE: We support Docker Image, please visit DockerHub for more information. The following steps are for building Docker Image manually.
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.
web will be included in this build guide product.
Before using Docker to build images and start containers, make sure that the following dependencies are installed and running in your environment.
# 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
- Preparing configuration files
Before starting the container, the configuration file
conf.yaml needs to be prepared inside the host to override the default configuration file inside the container.
- Only when
0.0.0.0can the external network access the services within the container.
conf.etcd.endpointsmust be able to access the
etcdservice within the container. For example: use
host.docker.internal:2379so that the container can access
etcdon 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
- 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
$ docker stop apisix-dashboard
- Caching is not recommended when building a image multiple times.
$ docker build -t apisix-dashboard:$tag . --no-cache=true