# How to create declarative configuration file (kong.yml) using docker during set up?

**URL:** <https://discuss.konghq.com/t/how-to-create-declarative-configuration-file-kong-yml-using-docker-during-set-up/7841>\
**Category:** Questions\
**Created:** [February 3, 2021, 7:44pm UTC](https://discuss.konghq.com/t/how-to-create-declarative-configuration-file-kong-yml-using-docker-during-set-up/7841 "2021-02-03T19:44:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Li](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/kevin_li/32/2525_2.png) [@Kevin\_Li](https://discuss.konghq.com/u/Kevin_Li)\
**Post date:** [February 3, 2021, 7:44pm UTC](https://discuss.konghq.com/t/how-to-create-declarative-configuration-file-kong-yml-using-docker-during-set-up/7841/1 "2021-02-03T19:44:33Z")

</div>

New to docker and kong. I am having trouble setting kong up using dockers. I couldn’t find a way to create kong.yml during setup. (The **Prepare your declarative configuration file** step) When I try to run the next set of commands, it gives me a bunch of command errors.

 ![Screenshot 2021-02-03 144408](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/3/3a00bc7f79070919702f2ffcbdc0fe344d4d6196.png)

---

<div class="post-metadata">

**Author:** ![narate](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/narate/32/1778_2.png) [@narate](https://discuss.konghq.com/u/narate)\
**Post date:** [February 4, 2021, 7:22am UTC](https://discuss.konghq.com/t/how-to-create-declarative-configuration-file-kong-yml-using-docker-during-set-up/7841/2 "2021-02-04T07:22:17Z")

</div>

Create (init) configuration.

```auto
docker run --rm -w /kong -v $PWD:/kong kong kong config init kong.yml

```

From your screenshot of the command, you use it is one command with multiple lines.  
Copy it all and paste once.

---

<div class="post-metadata">

**Author:** ![Kevin\_Li](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/kevin_li/32/2525_2.png) [@Kevin\_Li](https://discuss.konghq.com/u/Kevin_Li)\
**Post date:** [February 4, 2021, 6:38pm UTC](https://discuss.konghq.com/t/how-to-create-declarative-configuration-file-kong-yml-using-docker-during-set-up/7841/3 "2021-02-04T18:38:09Z")

</div>

Thank you for helping! There is a new error message when I run that.

 ![Screenshot 2021-02-04 133749](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/6/69cab18b0483c7fe40c2fd45cbf3961196727431.png)

---

<div class="post-metadata">

**Author:** ![xguru](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/xguru/32/41_2.png) [@xguru](https://discuss.konghq.com/u/xguru)\
**Post date:** [February 5, 2021, 3:01am UTC](https://discuss.konghq.com/t/how-to-create-declarative-configuration-file-kong-yml-using-docker-during-set-up/7841/4 "2021-02-05T03:01:55Z")

</div>

> [@narate](#):
>
> `docker run --rm -w /kong -v $PWD:/kong kong kong config init kong.yml`

You need repalce your actual kong path with “$PWD”.
