'Why my Docker Certboot container stopped? Exit status 1

My docker-compose.yml

version: "3.3"
services:
  proxy:
    image: nginx:stable-alpine
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./sites-enabled:/etc/nginx/conf.d
      - ./proxy/logs:/var/log/nginx
      - ./certbot/www:/var/www/certbot
      - ./certbot/conf/:/etc/nginx/ssl
  certbot:
    image: docker.io/certbot/certbot:latest
    volumes:
      - ./certbot/www:/var/www/certbot
      - ./certbot/conf/:/etc/letsencrypt

After the restart

      Name                     Command               State                                    Ports                                 
------------------------------------------------------------------------------------------------------------------------------------
ingress_certbot_1   certbot                          Exit 1                                                                         
ingress_proxy_1     /docker-entrypoint.sh ngin ...   Up       0.0.0.0:443->443/tcp,:::443->443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp

This what showed on screen

certbot_1  | Saving debug log to /var/log/letsencrypt/letsencrypt.log
certbot_1  | Certbot doesn't know how to automatically configure the web server on this system.

This is the output of the tree command

.
├── certbot
│   ├── conf
│   │   ├── accounts [error opening dir]
│   │   ├── archive [error opening dir]
│   │   ├── csr
│   │   │   ├── 0000_csr-certbot.pem
│   │   │   └── 0001_csr-certbot.pem
│   │   ├── keys [error opening dir]
│   │   ├── live [error opening dir]
│   │   ├── renewal
│   │   │   └── example.conf
│   │   └── renewal-hooks
│   │       ├── deploy
│   │       ├── post
│   │       └── pre
│   └── www
├── docker-compose.yml
├── proxy
│   └── logs
│       ├── access.log
│       └── error.log
└── sites-enabled
    ├── http_2_https.conf
    └── my-dev.conf

It seems that something wrong with path trajectory,regarding volume mounts.

How to find out what went wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source