I am trying to use certbot image for my deployment and this is the related part of docker-compose.yaml:
certbot:
container_name: certbot
image: certbot/certbot:v1.9.0
logging:
driver: "json-file"
options:
max-size: 500m
volumes:
- {vm_path}/certbot/certbot-etc:/etc/letsencrypt
- {vm_path}/certbot/certbot-var:/var/lib/letsencrypt
- {vm_path}/nginx/certbot-web-root:/var/www/certbot/html
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
command:
- certonly
- --webroot
- -w /var/www/certbot/html
- --email={email}
- --agree-tos
- --no-eff-email
- --dry-run
- -d {domain}
It produced this output:
certbot | /var/www/certbot/html does not exist or is not a directory
certbot exited with code 1
docker-compose version:
1.27.4
The operating system my web server runs on is (include version):
ubuntu 18
I can login to a root shell on my machine : yes
I'm also sure that {vm_path}/nginx/certbot-web-root exists, and the path is also absolute.