ehough / docker-nfs-server

A lightweight, robust, flexible, and containerized NFS server.
https://hub.docker.com/r/erichough/nfs-server/
GNU General Public License v3.0
669 stars 221 forks source link

Fix error in new versions 'missing CAP_SYS_ADMIN' even if cap exists or is privileged #67

Closed xZero707 closed 1 year ago

xZero707 commented 3 years ago

I've encountered this issue while building the image on my RaspberyPi.

In the latest version = is removed from the capsh output, therefore SYS_ADMIN / privileged is not properly detected.
This PR makes = optional so it retains backward compatibility and still works with most recent releases.

Fixes issue #66

xZero707 commented 2 years ago

@ehough Please review this. It would be nice to close.

dutchiechris commented 2 years ago

@ehough Indeed would be great to merge. OOTB broken on armv71 but with this change works like a charm 👍

brandonros commented 2 years ago

Can somebody push to Dockerhub with this?

xZero707 commented 1 year ago

Accepting this anytime soon?

xZero707 commented 1 year ago

It seems like this project is dead and @ehough is inactive. I will close this pull request and continue maintaining an independent fork here: https://github.com/N0rthernL1ghts/docker-nfs-server (no builds yet).

@ehough It would be best if you hand over this to a new maintainer. Unless you want to return, of course.

MichaelAntonFischer commented 1 year ago

Hi,

for me it doesn't fix the issue, @xZero707 would you please be so kind and check if you can get your solution to work with my docker-compose?

version: "3"
services:
  caddy:
    image: opago/caddy:latest
    container_name: caddy
    ports:
      - 80:80
      - 443:443
    environment:
      - CADDY_INGRESS_NETWORKS=nfs
    networks:
      - nfs
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - caddy:/data
    restart: always

  nfs:
    image: opago/nfs:latest
    container_name: nfs
    volumes:
      - ./data:/data
      - ./nfs:/etc/
    environment:
      - "SHARED_DIRECTORY=/nfs"
    cap_add:
      - SYS_ADMIN
      - SYS_MODULE
    labels:
      caddy: nfs.opago-pay.com
      caddy.reverse_proxy: "{{upstreams 2049}}"
    networks:
      - nfs
    restart: always

volumes:
  caddy:
    name: caddy

networks:
  nfs:
    name: nfs
xZero707 commented 1 year ago

@MichaelAntonFischer Please check https://github.com/N0rthernL1ghts/docker-nfs-server for the latest version. There is a new build, nlss/nfs-server. Try it, and let me know. Let's continue this conversation in the fork.