# Certonly error in docker

**URL:** <https://community.letsencrypt.org/t/certonly-error-in-docker/177274>\
**Category:** Help\
**Created:** [May 6, 2022, 12:45pm UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274 "2022-05-06T12:45:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mghr](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mghr](https://community.letsencrypt.org/u/mghr)\
**Post date:** [May 6, 2022, 12:45pm UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274/1 "2022-05-06T12:45:19Z")

</div>

My domain is:  
[one.mghr.org](http://one.mghr.org)

I ran this command:  
certonly --webroot --webroot-path /var/www/certbot/ -d [test.mghr.org](http://test.mghr.org) -m [email@gmail.com](mailto:email@gmail.com) --agree-tos --non-interactive

It produced this output:

 ![Screenshot 2022-05-06 at 1.44.11 pm](https://global.discourse-cdn.com/letsencrypt/original/3X/d/9/d99096d27f2d4d98c33065754fbcd7b734a61e0f.png)

My web server is (include version):  
Nginx running in docker

The operating system my web server runs on is (include version):  
NA

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):  
yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of `certbot --version` or `certbot-auto --version` if you're using Certbot):  
certbot latest

---

<div class="post-metadata">

**Author:** ![9peppe](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/9peppe/32/31596_2.png) [@9peppe](https://community.letsencrypt.org/u/9peppe)\
**Post date:** [May 6, 2022, 12:58pm UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274/2 "2022-05-06T12:58:40Z")

</div>

Zoom out. Show us the `docker-compose.yml` or the `docker run` command.

---

<div class="post-metadata">

**Author:** ![mghr](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mghr](https://community.letsencrypt.org/u/mghr)\
**Post date:** [May 6, 2022, 9:13pm UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274/3 "2022-05-06T21:13:13Z")

</div>

nginx:  
image: nginx:latest  
container\_name: nginx-container  
restart: always  
ports:  
- 80:80  
- 443:443  
volumes:  
- nginx:/etc/nginx/conf.d/  
- certbot-e:/etc/letsencrypt/  
- certbot-w:/var/www/certbot

once the container is running, I executed the following using bash inside the container.

> $ apt update && apt install certbot -y  
> $ certbot certonly --webroot --webroot-path /var/www/certbot/ -d [test.mghr.org](http://test.mghr.org) -m [email@gmail.com](mailto:email@gmail.com) --agree-tos --non-interactive

---

<div class="post-metadata">

**Author:** ![webprofusion](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/webprofusion/32/85310_2.png) [@webprofusion](https://community.letsencrypt.org/u/webprofusion)\
**Post date:** [May 7, 2022, 5:11am UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274/4 "2022-05-07T05:11:17Z")

</div>

What OS are you hosting docker in? Windows doesn't support symlinks and it's looks like this operation that's failing. It sounds similar to [OSError: [Errno 95] Not supported · Issue #4850 · certbot/certbot · GitHub](https://github.com/certbot/certbot/issues/4850)

---

<div class="post-metadata">

**Author:** ![9peppe](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/9peppe/32/31596_2.png) [@9peppe](https://community.letsencrypt.org/u/9peppe)\
**Post date:** [May 7, 2022, 6:05am UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274/5 "2022-05-07T06:05:40Z")

</div>

This is just a mess. There's no good way to make a webserver and an acme client cooperate, in docker.

There are just several hacky ways. Find one you like, or ask for alternatives.

---

<div class="post-metadata">

**Author:** ![mghr](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mghr](https://community.letsencrypt.org/u/mghr)\
**Post date:** [May 7, 2022, 9:50am UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274/6 "2022-05-07T09:50:26Z")

</div>

I am hosting on Azure Containers, there are other couple of containers so its a multi-container instance.

---

<div class="post-metadata">

**Author:** ![mghr](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mghr](https://community.letsencrypt.org/u/mghr)\
**Post date:** [May 7, 2022, 9:57am UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274/7 "2022-05-07T09:57:45Z")

</div>

Thank You, The link was really helpful

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [June 6, 2022, 9:58am UTC](https://community.letsencrypt.org/t/certonly-error-in-docker/177274/8 "2022-06-06T09:58:22Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
