Skip to content

Commit

Permalink
Fix: broken command examples for running decK with Docker (#7923)
Browse files Browse the repository at this point in the history
* fix broken command examples

* fix broken command examples
  • Loading branch information
lena-larionova authored Sep 13, 2024
1 parent 1cca572 commit 06a42f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
12 changes: 7 additions & 5 deletions app/_src/deck/guides/run-with-docker-1.28.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ content_type: how-to

If you used the `kong/deck` Docker image to install decK, you can use the Docker image to manage decK.

Adjust `KONG_ADMIN_HOST` and the port `8001` in the following examples to the host and port of your own {{site.base_gateway}} instance.

## Prerequisites
decK must be installed using a [Docker image](/deck/latest/installation/#docker-image).

Expand All @@ -14,7 +16,7 @@ Run this command to export the `kong.yaml` file:
```bash
docker run -i \
-v $(pwd):/deck \
kong/deck --kong-addr http://KONG_ADMIN_HOST:KONG_ADMIN_PORT --headers kong-admin-token:KONG_ADMIN_TOKEN -o /deck/kong.yaml gateway dump
kong/deck --kong-addr http://KONG_ADMIN_HOST:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN -o /deck/kong.yaml gateway dump
```
Where `$(pwd)/kong.yaml` is the path to a `kong.yaml` file.

Expand All @@ -25,7 +27,7 @@ Run this command to export objects from all the workspaces:
docker run -i \
-v $(pwd):/deck \
--workdir /deck \
kong/deck --kong-addr http://KONG_ADMIN_HOST:KONG_ADMIN_PORT:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN -o /deck/kong.yaml gateway dump --all-workspaces
kong/deck --kong-addr http://KONG_ADMIN_HOST:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN -o /deck/kong.yaml gateway dump --all-workspaces
```

## Reset the configuration
Expand All @@ -34,7 +36,7 @@ Run this command to initialize Kong objects:
```bash
docker run -i \
-v $(pwd):/deck \
kong/deck --kong-addr http://KONG_ADMIN_HOST:KONG_ADMIN_PORT:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN gateway reset
kong/deck --kong-addr http://KONG_ADMIN_HOST:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN gateway reset
```

## Import the configuration
Expand All @@ -43,7 +45,7 @@ Run this command to import `kong.yaml`:
```bash
docker run -i \
-v $(pwd):/deck \
kong/deck --kong-addr http://KONG_ADMIN_HOST:KONG_ADMIN_PORT:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN /deck/kong.yaml gateway sync
kong/deck --kong-addr http://KONG_ADMIN_HOST:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN gateway sync /deck/kong.yaml
```
In this example, `kong.yaml` is in `$(pwd)/kong.yaml`.

Expand All @@ -60,4 +62,4 @@ Run the following to check available command flags:
docker run kong/deck gateway dump --help
docker run kong/deck gateway sync --help
docker run kong/deck gateway reset --help
```
```
10 changes: 6 additions & 4 deletions app/_src/deck/guides/run-with-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ content_type: how-to

If you used the `kong/deck` Docker image to install decK, you can use the Docker image to manage decK.

Adjust `KONG_ADMIN_HOST` and the port `8001` in the following examples to the host and port of your own {{site.base_gateway}} instance.

## Prerequisites
decK must be installed using a [Docker image](/deck/latest/installation/#docker-image).

Expand All @@ -14,7 +16,7 @@ Run this command to export the `kong.yaml` file:
```bash
docker run -i \
-v $(pwd):/deck \
kong/deck --kong-addr http://KONG_ADMIN_HOST:KONG_ADMIN_PORT --headers kong-admin-token:KONG_ADMIN_TOKEN -o /deck/kong.yaml dump
kong/deck --kong-addr http://KONG_ADMIN_HOST:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN -o /deck/kong.yaml dump
```
Where `$(pwd)/kong.yaml` is the path to a `kong.yaml` file.

Expand All @@ -25,7 +27,7 @@ Run this command to export objects from all the workspaces:
docker run -i \
-v $(pwd):/deck \
--workdir /deck \
kong/deck --kong-addr http://KONG_ADMIN_HOST:KONG_ADMIN_PORT:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN dump --all-workspaces
kong/deck --kong-addr http://KONG_ADMIN_HOST:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN dump --all-workspaces
```

## Reset the configuration
Expand All @@ -34,7 +36,7 @@ Run this command to initialize Kong objects:
```bash
docker run -i \
-v $(pwd):/deck \
kong/deck --kong-addr http://KONG_ADMIN_HOST:KONG_ADMIN_PORT:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN reset
kong/deck --kong-addr http://KONG_ADMIN_HOST:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN reset
```

## Import the configuration
Expand All @@ -43,7 +45,7 @@ Run this command to import `kong.yaml`:
```bash
docker run -i \
-v $(pwd):/deck \
kong/deck --kong-addr http://KONG_ADMIN_HOST:KONG_ADMIN_PORT:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN -s /deck/kong.yaml sync
kong/deck --kong-addr http://KONG_ADMIN_HOST:8001 --headers kong-admin-token:KONG_ADMIN_TOKEN -s /deck/kong.yaml sync
```
In this example, `kong.yaml` is in `$(pwd)/kong.yaml`.

Expand Down

0 comments on commit 06a42f0

Please sign in to comment.