Skip to content

Commit 09020de

Browse files
authored
Add a fuse plugin to enable fuse filesystems at runtime (#6)
1 parent f9c6287 commit 09020de

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

novnc_rocker/fuse.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import em
2+
import getpass
3+
import os
4+
import pkgutil
5+
import sys
6+
from rocker.extensions import RockerExtension, name_to_argument
7+
8+
9+
class Fuse(RockerExtension):
10+
@staticmethod
11+
def get_name():
12+
return 'fuse'
13+
14+
def __init__(self):
15+
self._env_subs = {}
16+
self.name = Fuse.get_name()
17+
18+
def get_docker_args(self, cli_args):
19+
return ' --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse'
20+
21+
@staticmethod
22+
def register_arguments(parser, defaults={}):
23+
parser.add_argument(name_to_argument(Fuse.get_name()),
24+
action='store_true',
25+
default=defaults.get(Fuse.get_name(), None),
26+
help="enable Fuse")

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
],
2626
entry_points={
2727
'rocker.extensions': [
28+
'fuse = novnc_rocker.fuse:Fuse',
2829
'novnc = novnc_rocker.novnc:NoVNC',
2930
'turbovnc = novnc_rocker.turbovnc:TurboVNC',
3031
]

0 commit comments

Comments
 (0)