Build an image from the source codes
Docker images are not official ASF releases but provided for convenience. Recommended usage is always to build the source.
Clone the repository
Clone the apisix-docker repository and navigate into the project directory:
git clone https://github.com/apache/apisix-docker.git
cd apisix-docker
Build a Docker image
Choose one of the following approaches to build a Docker image based on your requirements.
Build an image from a release
The release Dockerfiles in this checkout install APISIX 3.21.0. Build the Debian image with the following command.
make build-on-debian
Use make build-on-ubuntu or make build-on-redhat for the other distributions.
Build an image from master branch
This is provided for developer’s convenience.
Build a Docker image from the master branch:
APISIX_VERSION=master # master branch
DISTRO=debian # debian, redhat
make build-on-$DISTRO
Build an image from locally customized/patched source code
Build a Docker image from locally customized/patched source code with this Dockerfile:
docker build -t apisix-dev-local -f /path/to/debian-dev/Dockerfile.local .
Check Docker image
Check the built Docker images:
docker images
If the image was built successfully, you should see the image listed, similar to the following:
REPOSITORY TAG IMAGE ID CREATED SIZE
apache/apisix 3.5.0-debian 5c3b6ffdef06 About a minute ago 337MB