Is it possible to somehow mount a folder to Adguard running in Docker? I have auto renewed Letsencrypt certificates, but have to copy/paste them into AdGuard. Trying to add a direct path to files doesn’t work. Could it be just permissions?

  • schizo@forum.uncomfortable.business
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    2 months ago

    Sure, you can just add a bind mount volume to mount a path from the host system to the container.

    The only thing you’d have to make sure of is that whatever uid/gid the container is running as has permissions to access whatever cert files you’re after (but if you’re being bad and running as root, then congrats, that’s not usually an issue!)

    Edit: redacted docker-compose example of this:

      service-name:
        image: image-tag
        restart: unless-stopped
        container_name: service-name
        hostname: service-name
        command: '--cert /data/live/domain.com/cert.pem --key /data/live/domain.com/privkey.pem port ip:23'
        ports:
          - port-external:port-internal
        volumes:
          - /etc/letsencrypt:/data:ro