# Docker with --web.config.file

**URL:** <https://discuss.prometheus.io/t/docker-with-web-config-file/1514>\
**Category:** General Help/Support\
**Created:** [March 8, 2023, 5:33pm UTC](https://discuss.prometheus.io/t/docker-with-web-config-file/1514 "2023-03-08T17:33:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thulsidk1](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/thulsidk1/32/627_2.png) [@thulsidk1](https://discuss.prometheus.io/u/thulsidk1)\
**Post date:** [March 8, 2023, 5:33pm UTC](https://discuss.prometheus.io/t/docker-with-web-config-file/1514/1 "2023-03-08T17:33:55Z")

</div>

Hello Support

Please provide a example of docker prometheus image with --web.config.file flag. I have tried various options but no luck.

Thanks and Regards  
Thulsi Doss Krishnan

---

<div class="post-metadata">

**Author:** ![thulsidk1](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/thulsidk1/32/627_2.png) [@thulsidk1](https://discuss.prometheus.io/u/thulsidk1)\
**Post date:** [March 9, 2023, 8:30am UTC](https://discuss.prometheus.io/t/docker-with-web-config-file/1514/2 "2023-03-09T08:30:46Z")

</div>

Answering myself , this tech note /article was GOD sent though it uses **non docker** approach.

[https://lightsail.aws.amazon.com/ls/docs/en\_us/articles/amazon-lightsail-install-prometheus](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-install-prometheus)

so i was able to successfully pass the --web.config.file flag as in like this command

sudo -u prometheus /usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus --web.console.templates=/etc/prometheus/consoles --web.console.libraries=/etc/prometheus/console\_libraries – **web.config.file** =/etc/prometheus/web-config.yml

Thanks and Regards  
Thulsi Doss Krishnan

---

<div class="post-metadata">

**Author:** ![thulsidk1](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/thulsidk1/32/627_2.png) [@thulsidk1](https://discuss.prometheus.io/u/thulsidk1)\
**Post date:** [March 9, 2023, 12:18pm UTC](https://discuss.prometheus.io/t/docker-with-web-config-file/1514/3 "2023-03-09T12:18:12Z")

</div>

Another source of luck ,thanks Muneeb Shaikh !

docker run -d --name prometheus -p 9090:9090 -v /home/ec2-user/prometheus\_graphana/prometheus.yml:/etc/prometheus/prometheus.yml -v /home/ec2-user/prometheus\_graphana/web-config.yml:/etc/prometheus/web-config.yml prom/prometheus **–web.config.file=/etc/prometheus/web-config.yml**

the above command works

Thanks and Regards  
Thulsi Doss Krishnan
