Remove Docker VOLUME instruction for more flexibility

Inheriting from the base image is made easier without
the VOLUME instruction, since it cannot be reverted.
All guides contain `--volume` explanations/usage
examples anyway, so the VOLUME instructions in the
Dockerfile aren't necessary.

See also https://stackoverflow.com/a/62068396/11477374 for more
examples for why that instruction can be harmful.
This commit is contained in:
Alex Povel 2021-01-21 15:07:11 +01:00
parent 7fab31beae
commit 76e538ca5f
No known key found for this signature in database
GPG Key ID: F34917ECD04BCAB2
1 changed files with 0 additions and 2 deletions

View File

@ -35,8 +35,6 @@ RUN setcap 'cap_net_bind_service=+eip' /opt/adguardhome/AdGuardHome
EXPOSE 53/tcp 53/udp 67/udp 68/udp 80/tcp 443/tcp 853/tcp 3000/tcp EXPOSE 53/tcp 53/udp 67/udp 68/udp 80/tcp 443/tcp 853/tcp 3000/tcp
VOLUME ["/opt/adguardhome/conf", "/opt/adguardhome/work"]
WORKDIR /opt/adguardhome/work WORKDIR /opt/adguardhome/work
ENTRYPOINT ["/opt/adguardhome/AdGuardHome"] ENTRYPOINT ["/opt/adguardhome/AdGuardHome"]