# Docker

We provide edge-cli docker image to make use it more easily.

# 1. Download

You can download edge-cli use the command below.

docker pull registry.openresty.com/edge-cli/fedora32/openresty-edge-cli:latest

or

docker pull registry.openresty.com/edge-cli/fedora32/openresty-edge-cli:0.1.2-1

To specify edge-cli version by docker image's tag.

You can list all docker image's tags use the command below.

# curl -s "https://registry.openresty.com/v2/edge-cli/fedora32/openresty-edge-cli/tags/list" | json_pp
{
   "name" : "edge-cli/fedora32/openresty-edge-cli",
   "tags" : [
      "0.1.2-1",
      "latest"
   ]
}

# 2. Usage

You can run the container use the command below.

docker run -ti --rm \
    -v ~/.oredge/config:/root/.oredge/config \
    registry.openresty.com/edge-cli/fedora32/openresty-edge-cli:latest /bin/bash

Now you can use oredge command.

Use -v /path/to/your/config:/root/.oredge/config to mount your edge-cli configuration.

Here are the example contents of the configuration.

[admin]
host=admin-dev.openresty.com
port=443
verify_ssl=true
api_token=xxxxxxxxxxxxxxxxxxxxxx

If you don't know how to get api_token, please goto API Token document.